11
11
import com .azure .core .http .HttpPipelinePosition ;
12
12
import com .azure .core .http .policy .AddDatePolicy ;
13
13
import com .azure .core .http .policy .AddHeadersFromContextPolicy ;
14
- import com .azure .core .http .policy .HttpLogOptions ;
15
14
import com .azure .core .http .policy .HttpLoggingPolicy ;
15
+ import com .azure .core .http .policy .HttpLogOptions ;
16
16
import com .azure .core .http .policy .HttpPipelinePolicy ;
17
17
import com .azure .core .http .policy .HttpPolicyProviders ;
18
18
import com .azure .core .http .policy .RequestIdPolicy ;
30
30
import com .azure .resourcemanager .signalr .implementation .SignalRManagementClientBuilder ;
31
31
import com .azure .resourcemanager .signalr .implementation .SignalRPrivateEndpointConnectionsImpl ;
32
32
import com .azure .resourcemanager .signalr .implementation .SignalRPrivateLinkResourcesImpl ;
33
+ import com .azure .resourcemanager .signalr .implementation .SignalRReplicaSharedPrivateLinkResourcesImpl ;
33
34
import com .azure .resourcemanager .signalr .implementation .SignalRReplicasImpl ;
34
35
import com .azure .resourcemanager .signalr .implementation .SignalRSharedPrivateLinkResourcesImpl ;
35
36
import com .azure .resourcemanager .signalr .implementation .SignalRsImpl ;
40
41
import com .azure .resourcemanager .signalr .models .SignalRPrivateEndpointConnections ;
41
42
import com .azure .resourcemanager .signalr .models .SignalRPrivateLinkResources ;
42
43
import com .azure .resourcemanager .signalr .models .SignalRReplicas ;
43
- import com .azure .resourcemanager .signalr .models .SignalRSharedPrivateLinkResources ;
44
+ import com .azure .resourcemanager .signalr .models .SignalRReplicaSharedPrivateLinkResources ;
44
45
import com .azure .resourcemanager .signalr .models .SignalRs ;
46
+ import com .azure .resourcemanager .signalr .models .SignalRSharedPrivateLinkResources ;
45
47
import com .azure .resourcemanager .signalr .models .Usages ;
46
48
import java .time .Duration ;
47
49
import java .time .temporal .ChronoUnit ;
50
52
import java .util .Objects ;
51
53
import java .util .stream .Collectors ;
52
54
53
- /** Entry point to SignalRManager. REST API for Azure SignalR Service. */
55
+ /**
56
+ * Entry point to SignalRManager.
57
+ * REST API for Azure SignalR Service.
58
+ */
54
59
public final class SignalRManager {
55
60
private Operations operations ;
56
61
@@ -68,25 +73,25 @@ public final class SignalRManager {
68
73
69
74
private SignalRReplicas signalRReplicas ;
70
75
76
+ private SignalRReplicaSharedPrivateLinkResources signalRReplicaSharedPrivateLinkResources ;
77
+
71
78
private SignalRSharedPrivateLinkResources signalRSharedPrivateLinkResources ;
72
79
73
80
private final SignalRManagementClient clientObject ;
74
81
75
82
private SignalRManager (HttpPipeline httpPipeline , AzureProfile profile , Duration defaultPollInterval ) {
76
83
Objects .requireNonNull (httpPipeline , "'httpPipeline' cannot be null." );
77
84
Objects .requireNonNull (profile , "'profile' cannot be null." );
78
- this .clientObject =
79
- new SignalRManagementClientBuilder ()
80
- .pipeline (httpPipeline )
81
- .endpoint (profile .getEnvironment ().getResourceManagerEndpoint ())
82
- .subscriptionId (profile .getSubscriptionId ())
83
- .defaultPollInterval (defaultPollInterval )
84
- .buildClient ();
85
+ this .clientObject = new SignalRManagementClientBuilder ().pipeline (httpPipeline )
86
+ .endpoint (profile .getEnvironment ().getResourceManagerEndpoint ())
87
+ .subscriptionId (profile .getSubscriptionId ())
88
+ .defaultPollInterval (defaultPollInterval )
89
+ .buildClient ();
85
90
}
86
91
87
92
/**
88
93
* Creates an instance of SignalR service API entry point.
89
- *
94
+ *
90
95
* @param credential the credential to use.
91
96
* @param profile the Azure profile for client.
92
97
* @return the SignalR service API instance.
@@ -99,7 +104,7 @@ public static SignalRManager authenticate(TokenCredential credential, AzureProfi
99
104
100
105
/**
101
106
* Creates an instance of SignalR service API entry point.
102
- *
107
+ *
103
108
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
104
109
* @param profile the Azure profile for client.
105
110
* @return the SignalR service API instance.
@@ -112,14 +117,16 @@ public static SignalRManager authenticate(HttpPipeline httpPipeline, AzureProfil
112
117
113
118
/**
114
119
* Gets a Configurable instance that can be used to create SignalRManager with optional configuration.
115
- *
120
+ *
116
121
* @return the Configurable instance allowing configurations.
117
122
*/
118
123
public static Configurable configure () {
119
124
return new SignalRManager .Configurable ();
120
125
}
121
126
122
- /** The Configurable allowing configurations to be set. */
127
+ /**
128
+ * The Configurable allowing configurations to be set.
129
+ */
123
130
public static final class Configurable {
124
131
private static final ClientLogger LOGGER = new ClientLogger (Configurable .class );
125
132
@@ -191,8 +198,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
191
198
192
199
/**
193
200
* Sets the retry options for the HTTP pipeline retry policy.
194
- *
195
- * <p> This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
201
+ * <p>
202
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
196
203
*
197
204
* @param retryOptions the retry options for the HTTP pipeline retry policy.
198
205
* @return the configurable object itself.
@@ -209,8 +216,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
209
216
* @return the configurable object itself.
210
217
*/
211
218
public Configurable withDefaultPollInterval (Duration defaultPollInterval ) {
212
- this .defaultPollInterval =
213
- Objects .requireNonNull (defaultPollInterval , "'defaultPollInterval' cannot be null." );
219
+ this .defaultPollInterval
220
+ = Objects .requireNonNull (defaultPollInterval , "'defaultPollInterval' cannot be null." );
214
221
if (this .defaultPollInterval .isNegative ()) {
215
222
throw LOGGER
216
223
.logExceptionAsError (new IllegalArgumentException ("'defaultPollInterval' cannot be negative" ));
@@ -230,15 +237,13 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
230
237
Objects .requireNonNull (profile , "'profile' cannot be null." );
231
238
232
239
StringBuilder userAgentBuilder = new StringBuilder ();
233
- userAgentBuilder
234
- .append ("azsdk-java" )
240
+ userAgentBuilder .append ("azsdk-java" )
235
241
.append ("-" )
236
242
.append ("com.azure.resourcemanager.signalr" )
237
243
.append ("/" )
238
- .append ("1.0.0-beta.8 " );
244
+ .append ("1.0.0-beta.1 " );
239
245
if (!Configuration .getGlobalConfiguration ().get ("AZURE_TELEMETRY_DISABLED" , false )) {
240
- userAgentBuilder
241
- .append (" (" )
246
+ userAgentBuilder .append (" (" )
242
247
.append (Configuration .getGlobalConfiguration ().get ("java.version" ))
243
248
.append ("; " )
244
249
.append (Configuration .getGlobalConfiguration ().get ("os.name" ))
@@ -263,38 +268,28 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
263
268
policies .add (new UserAgentPolicy (userAgentBuilder .toString ()));
264
269
policies .add (new AddHeadersFromContextPolicy ());
265
270
policies .add (new RequestIdPolicy ());
266
- policies
267
- .addAll (
268
- this
269
- .policies
270
- .stream ()
271
- .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_CALL )
272
- .collect (Collectors .toList ()));
271
+ policies .addAll (this .policies .stream ()
272
+ .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_CALL )
273
+ .collect (Collectors .toList ()));
273
274
HttpPolicyProviders .addBeforeRetryPolicies (policies );
274
275
policies .add (retryPolicy );
275
276
policies .add (new AddDatePolicy ());
276
277
policies .add (new ArmChallengeAuthenticationPolicy (credential , scopes .toArray (new String [0 ])));
277
- policies
278
- .addAll (
279
- this
280
- .policies
281
- .stream ()
282
- .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_RETRY )
283
- .collect (Collectors .toList ()));
278
+ policies .addAll (this .policies .stream ()
279
+ .filter (p -> p .getPipelinePosition () == HttpPipelinePosition .PER_RETRY )
280
+ .collect (Collectors .toList ()));
284
281
HttpPolicyProviders .addAfterRetryPolicies (policies );
285
282
policies .add (new HttpLoggingPolicy (httpLogOptions ));
286
- HttpPipeline httpPipeline =
287
- new HttpPipelineBuilder ()
288
- .httpClient (httpClient )
289
- .policies (policies .toArray (new HttpPipelinePolicy [0 ]))
290
- .build ();
283
+ HttpPipeline httpPipeline = new HttpPipelineBuilder ().httpClient (httpClient )
284
+ .policies (policies .toArray (new HttpPipelinePolicy [0 ]))
285
+ .build ();
291
286
return new SignalRManager (httpPipeline , profile , defaultPollInterval );
292
287
}
293
288
}
294
289
295
290
/**
296
291
* Gets the resource collection API of Operations.
297
- *
292
+ *
298
293
* @return Resource collection API of Operations.
299
294
*/
300
295
public Operations operations () {
@@ -306,7 +301,7 @@ public Operations operations() {
306
301
307
302
/**
308
303
* Gets the resource collection API of SignalRs. It manages SignalRResource.
309
- *
304
+ *
310
305
* @return Resource collection API of SignalRs.
311
306
*/
312
307
public SignalRs signalRs () {
@@ -318,7 +313,7 @@ public SignalRs signalRs() {
318
313
319
314
/**
320
315
* Gets the resource collection API of Usages.
321
- *
316
+ *
322
317
* @return Resource collection API of Usages.
323
318
*/
324
319
public Usages usages () {
@@ -330,20 +325,20 @@ public Usages usages() {
330
325
331
326
/**
332
327
* Gets the resource collection API of SignalRCustomCertificates. It manages CustomCertificate.
333
- *
328
+ *
334
329
* @return Resource collection API of SignalRCustomCertificates.
335
330
*/
336
331
public SignalRCustomCertificates signalRCustomCertificates () {
337
332
if (this .signalRCustomCertificates == null ) {
338
- this .signalRCustomCertificates =
339
- new SignalRCustomCertificatesImpl (clientObject .getSignalRCustomCertificates (), this );
333
+ this .signalRCustomCertificates
334
+ = new SignalRCustomCertificatesImpl (clientObject .getSignalRCustomCertificates (), this );
340
335
}
341
336
return signalRCustomCertificates ;
342
337
}
343
338
344
339
/**
345
340
* Gets the resource collection API of SignalRCustomDomains. It manages CustomDomain.
346
- *
341
+ *
347
342
* @return Resource collection API of SignalRCustomDomains.
348
343
*/
349
344
public SignalRCustomDomains signalRCustomDomains () {
@@ -355,33 +350,33 @@ public SignalRCustomDomains signalRCustomDomains() {
355
350
356
351
/**
357
352
* Gets the resource collection API of SignalRPrivateEndpointConnections.
358
- *
353
+ *
359
354
* @return Resource collection API of SignalRPrivateEndpointConnections.
360
355
*/
361
356
public SignalRPrivateEndpointConnections signalRPrivateEndpointConnections () {
362
357
if (this .signalRPrivateEndpointConnections == null ) {
363
- this .signalRPrivateEndpointConnections =
364
- new SignalRPrivateEndpointConnectionsImpl (clientObject .getSignalRPrivateEndpointConnections (), this );
358
+ this .signalRPrivateEndpointConnections
359
+ = new SignalRPrivateEndpointConnectionsImpl (clientObject .getSignalRPrivateEndpointConnections (), this );
365
360
}
366
361
return signalRPrivateEndpointConnections ;
367
362
}
368
363
369
364
/**
370
365
* Gets the resource collection API of SignalRPrivateLinkResources.
371
- *
366
+ *
372
367
* @return Resource collection API of SignalRPrivateLinkResources.
373
368
*/
374
369
public SignalRPrivateLinkResources signalRPrivateLinkResources () {
375
370
if (this .signalRPrivateLinkResources == null ) {
376
- this .signalRPrivateLinkResources =
377
- new SignalRPrivateLinkResourcesImpl (clientObject .getSignalRPrivateLinkResources (), this );
371
+ this .signalRPrivateLinkResources
372
+ = new SignalRPrivateLinkResourcesImpl (clientObject .getSignalRPrivateLinkResources (), this );
378
373
}
379
374
return signalRPrivateLinkResources ;
380
375
}
381
376
382
377
/**
383
378
* Gets the resource collection API of SignalRReplicas. It manages Replica.
384
- *
379
+ *
385
380
* @return Resource collection API of SignalRReplicas.
386
381
*/
387
382
public SignalRReplicas signalRReplicas () {
@@ -392,22 +387,36 @@ public SignalRReplicas signalRReplicas() {
392
387
}
393
388
394
389
/**
395
- * Gets the resource collection API of SignalRSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
396
- *
390
+ * Gets the resource collection API of SignalRReplicaSharedPrivateLinkResources. It manages
391
+ * SharedPrivateLinkResource.
392
+ *
393
+ * @return Resource collection API of SignalRReplicaSharedPrivateLinkResources.
394
+ */
395
+ public SignalRReplicaSharedPrivateLinkResources signalRReplicaSharedPrivateLinkResources () {
396
+ if (this .signalRReplicaSharedPrivateLinkResources == null ) {
397
+ this .signalRReplicaSharedPrivateLinkResources = new SignalRReplicaSharedPrivateLinkResourcesImpl (
398
+ clientObject .getSignalRReplicaSharedPrivateLinkResources (), this );
399
+ }
400
+ return signalRReplicaSharedPrivateLinkResources ;
401
+ }
402
+
403
+ /**
404
+ * Gets the resource collection API of SignalRSharedPrivateLinkResources.
405
+ *
397
406
* @return Resource collection API of SignalRSharedPrivateLinkResources.
398
407
*/
399
408
public SignalRSharedPrivateLinkResources signalRSharedPrivateLinkResources () {
400
409
if (this .signalRSharedPrivateLinkResources == null ) {
401
- this .signalRSharedPrivateLinkResources =
402
- new SignalRSharedPrivateLinkResourcesImpl (clientObject .getSignalRSharedPrivateLinkResources (), this );
410
+ this .signalRSharedPrivateLinkResources
411
+ = new SignalRSharedPrivateLinkResourcesImpl (clientObject .getSignalRSharedPrivateLinkResources (), this );
403
412
}
404
413
return signalRSharedPrivateLinkResources ;
405
414
}
406
415
407
416
/**
408
417
* Gets wrapped service client SignalRManagementClient providing direct access to the underlying auto-generated API
409
418
* implementation, based on Azure REST API.
410
- *
419
+ *
411
420
* @return Wrapped service client SignalRManagementClient.
412
421
*/
413
422
public SignalRManagementClient serviceClient () {
0 commit comments