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