Skip to content

Commit a07b229

Browse files
azure-sdk-automation[bot]azure-sdkweidongxu-microsoft
authored
[AutoPR azure-resourcemanager-webpubsub]-generated-from-SDK Generation - Java-6578471 (#49859)
* Configurations: 'specification/webpubsub/resource-manager/Microsoft.SignalRService/SignalRService/tspconfig.yaml', and CommitSHA: 'e12a60d5808eaee0bdb982a2c87626d00892f362' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6578471 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <azuresdk@microsoft.com> Co-authored-by: Weidong Xu <weidxu@microsoft.com>
1 parent 0470367 commit a07b229

354 files changed

Lines changed: 10466 additions & 10155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sdk/webpubsub/azure-resourcemanager-webpubsub/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager WebPubSub client library for Java.
44

5-
This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2024-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package api-version 2025-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
WebPubSubManager manager = WebPubSubManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -108,5 +108,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
108108
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
109109
[coc]: https://opensource.microsoft.com/codeofconduct/
110110
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
111-
112-

sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md

Lines changed: 167 additions & 107 deletions
Large diffs are not rendered by default.

sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!--
22
~ Copyright (c) Microsoft Corporation. All rights reserved.
33
~ Licensed under the MIT License.
4-
~ Code generated by Microsoft (R) AutoRest Code Generator.
4+
~ Code generated by Microsoft (R) TypeSpec Code Generator.
55
-->
6-
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
77
<modelVersion>4.0.0</modelVersion>
88
<parent>
99
<groupId>com.azure</groupId>
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for WebPubSub Management</name>
21-
<description>This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2024-03-01.</description>
21+
<description>This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package api-version 2025-12-01-preview.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -45,13 +45,9 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4849
</properties>
4950
<dependencies>
50-
<dependency>
51-
<groupId>com.azure</groupId>
52-
<artifactId>azure-json</artifactId>
53-
<version>1.5.1</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
54-
</dependency>
5551
<dependency>
5652
<groupId>com.azure</groupId>
5753
<artifactId>azure-core</artifactId>
@@ -74,6 +70,11 @@
7470
<version>1.18.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
7571
<scope>test</scope>
7672
</dependency>
73+
<dependency>
74+
<groupId>com.azure</groupId>
75+
<artifactId>azure-json</artifactId>
76+
<version>1.5.1</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
77+
</dependency>
7778
<dependency>
7879
<groupId>com.azure.resourcemanager</groupId>
7980
<artifactId>azure-resourcemanager-resources</artifactId>

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java

Lines changed: 75 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.webpubsub;
66

@@ -11,17 +11,18 @@
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
1313
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
14-
import com.azure.core.http.policy.HttpLoggingPolicy;
14+
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1515
import com.azure.core.http.policy.HttpLogOptions;
16+
import com.azure.core.http.policy.HttpLoggingPolicy;
1617
import com.azure.core.http.policy.HttpPipelinePolicy;
1718
import com.azure.core.http.policy.HttpPolicyProviders;
1819
import com.azure.core.http.policy.RequestIdPolicy;
1920
import com.azure.core.http.policy.RetryOptions;
2021
import com.azure.core.http.policy.RetryPolicy;
2122
import com.azure.core.http.policy.UserAgentPolicy;
22-
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient;
2728
import com.azure.resourcemanager.webpubsub.implementation.OperationsImpl;
@@ -30,6 +31,7 @@
3031
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomDomainsImpl;
3132
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsImpl;
3233
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubManagementClientBuilder;
34+
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPersistentStoragesImpl;
3335
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsImpl;
3436
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesImpl;
3537
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicaSharedPrivateLinkResourcesImpl;
@@ -41,16 +43,18 @@
4143
import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomCertificates;
4244
import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomDomains;
4345
import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs;
46+
import com.azure.resourcemanager.webpubsub.models.WebPubSubPersistentStorages;
4447
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateEndpointConnections;
4548
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateLinkResources;
46-
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicas;
4749
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicaSharedPrivateLinkResources;
48-
import com.azure.resourcemanager.webpubsub.models.WebPubSubs;
50+
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicas;
4951
import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources;
52+
import com.azure.resourcemanager.webpubsub.models.WebPubSubs;
5053
import java.time.Duration;
5154
import java.time.temporal.ChronoUnit;
5255
import java.util.ArrayList;
5356
import java.util.List;
57+
import java.util.Map;
5458
import java.util.Objects;
5559
import java.util.stream.Collectors;
5660

@@ -61,25 +65,27 @@
6165
public final class WebPubSubManager {
6266
private Operations operations;
6367

68+
private WebPubSubHubs webPubSubHubs;
69+
70+
private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources;
71+
6472
private WebPubSubs webPubSubs;
6573

66-
private Usages usages;
74+
private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources;
6775

6876
private WebPubSubCustomCertificates webPubSubCustomCertificates;
6977

7078
private WebPubSubCustomDomains webPubSubCustomDomains;
7179

72-
private WebPubSubHubs webPubSubHubs;
73-
7480
private WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections;
7581

76-
private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources;
77-
7882
private WebPubSubReplicas webPubSubReplicas;
7983

8084
private WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateLinkResources;
8185

82-
private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources;
86+
private WebPubSubPersistentStorages webPubSubPersistentStorages;
87+
88+
private Usages usages;
8389

8490
private final WebPubSubManagementClient clientObject;
8591

@@ -133,6 +139,9 @@ public static Configurable configure() {
133139
*/
134140
public static final class Configurable {
135141
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
142+
private static final String SDK_VERSION = "version";
143+
private static final Map<String, String> PROPERTIES
144+
= CoreUtils.getProperties("azure-resourcemanager-webpubsub.properties");
136145

137146
private HttpClient httpClient;
138147
private HttpLogOptions httpLogOptions;
@@ -240,12 +249,14 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
240249
Objects.requireNonNull(credential, "'credential' cannot be null.");
241250
Objects.requireNonNull(profile, "'profile' cannot be null.");
242251

252+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
253+
243254
StringBuilder userAgentBuilder = new StringBuilder();
244255
userAgentBuilder.append("azsdk-java")
245256
.append("-")
246257
.append("com.azure.resourcemanager.webpubsub")
247258
.append("/")
248-
.append("1.1.0");
259+
.append(clientVersion);
249260
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
250261
userAgentBuilder.append(" (")
251262
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -278,7 +289,7 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
278289
HttpPolicyProviders.addBeforeRetryPolicies(policies);
279290
policies.add(retryPolicy);
280291
policies.add(new AddDatePolicy());
281-
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
292+
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
282293
policies.addAll(this.policies.stream()
283294
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
284295
.collect(Collectors.toList()));
@@ -303,6 +314,31 @@ public Operations operations() {
303314
return operations;
304315
}
305316

317+
/**
318+
* Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub.
319+
*
320+
* @return Resource collection API of WebPubSubHubs.
321+
*/
322+
public WebPubSubHubs webPubSubHubs() {
323+
if (this.webPubSubHubs == null) {
324+
this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this);
325+
}
326+
return webPubSubHubs;
327+
}
328+
329+
/**
330+
* Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
331+
*
332+
* @return Resource collection API of WebPubSubSharedPrivateLinkResources.
333+
*/
334+
public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() {
335+
if (this.webPubSubSharedPrivateLinkResources == null) {
336+
this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl(
337+
clientObject.getWebPubSubSharedPrivateLinkResources(), this);
338+
}
339+
return webPubSubSharedPrivateLinkResources;
340+
}
341+
306342
/**
307343
* Gets the resource collection API of WebPubSubs. It manages WebPubSubResource.
308344
*
@@ -316,15 +352,16 @@ public WebPubSubs webPubSubs() {
316352
}
317353

318354
/**
319-
* Gets the resource collection API of Usages.
355+
* Gets the resource collection API of WebPubSubPrivateLinkResources.
320356
*
321-
* @return Resource collection API of Usages.
357+
* @return Resource collection API of WebPubSubPrivateLinkResources.
322358
*/
323-
public Usages usages() {
324-
if (this.usages == null) {
325-
this.usages = new UsagesImpl(clientObject.getUsages(), this);
359+
public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() {
360+
if (this.webPubSubPrivateLinkResources == null) {
361+
this.webPubSubPrivateLinkResources
362+
= new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this);
326363
}
327-
return usages;
364+
return webPubSubPrivateLinkResources;
328365
}
329366

330367
/**
@@ -353,18 +390,6 @@ public WebPubSubCustomDomains webPubSubCustomDomains() {
353390
return webPubSubCustomDomains;
354391
}
355392

356-
/**
357-
* Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub.
358-
*
359-
* @return Resource collection API of WebPubSubHubs.
360-
*/
361-
public WebPubSubHubs webPubSubHubs() {
362-
if (this.webPubSubHubs == null) {
363-
this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this);
364-
}
365-
return webPubSubHubs;
366-
}
367-
368393
/**
369394
* Gets the resource collection API of WebPubSubPrivateEndpointConnections.
370395
*
@@ -378,19 +403,6 @@ public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections()
378403
return webPubSubPrivateEndpointConnections;
379404
}
380405

381-
/**
382-
* Gets the resource collection API of WebPubSubPrivateLinkResources.
383-
*
384-
* @return Resource collection API of WebPubSubPrivateLinkResources.
385-
*/
386-
public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() {
387-
if (this.webPubSubPrivateLinkResources == null) {
388-
this.webPubSubPrivateLinkResources
389-
= new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this);
390-
}
391-
return webPubSubPrivateLinkResources;
392-
}
393-
394406
/**
395407
* Gets the resource collection API of WebPubSubReplicas. It manages Replica.
396408
*
@@ -417,16 +429,28 @@ public WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateL
417429
}
418430

419431
/**
420-
* Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
432+
* Gets the resource collection API of WebPubSubPersistentStorages. It manages PersistentStorage.
421433
*
422-
* @return Resource collection API of WebPubSubSharedPrivateLinkResources.
434+
* @return Resource collection API of WebPubSubPersistentStorages.
423435
*/
424-
public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() {
425-
if (this.webPubSubSharedPrivateLinkResources == null) {
426-
this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl(
427-
clientObject.getWebPubSubSharedPrivateLinkResources(), this);
436+
public WebPubSubPersistentStorages webPubSubPersistentStorages() {
437+
if (this.webPubSubPersistentStorages == null) {
438+
this.webPubSubPersistentStorages
439+
= new WebPubSubPersistentStoragesImpl(clientObject.getWebPubSubPersistentStorages(), this);
428440
}
429-
return webPubSubSharedPrivateLinkResources;
441+
return webPubSubPersistentStorages;
442+
}
443+
444+
/**
445+
* Gets the resource collection API of Usages.
446+
*
447+
* @return Resource collection API of Usages.
448+
*/
449+
public Usages usages() {
450+
if (this.usages == null) {
451+
this.usages = new UsagesImpl(clientObject.getUsages(), this);
452+
}
453+
return usages;
430454
}
431455

432456
/**

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.webpubsub.fluent;
66

@@ -15,23 +15,23 @@
1515
*/
1616
public interface OperationsClient {
1717
/**
18-
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
18+
* List the operations for the provider.
1919
*
2020
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2121
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
22-
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
22+
* @return paged collection of Operation items as paginated response with {@link PagedIterable}.
2323
*/
2424
@ServiceMethod(returns = ReturnType.COLLECTION)
2525
PagedIterable<OperationInner> list();
2626

2727
/**
28-
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
28+
* List the operations for the provider.
2929
*
3030
* @param context The context to associate with this operation.
3131
* @throws IllegalArgumentException thrown if parameters fail the validation.
3232
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3333
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
34-
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
34+
* @return paged collection of Operation items as paginated response with {@link PagedIterable}.
3535
*/
3636
@ServiceMethod(returns = ReturnType.COLLECTION)
3737
PagedIterable<OperationInner> list(Context context);

sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.webpubsub.fluent;
66

@@ -17,7 +17,7 @@ public interface UsagesClient {
1717
/**
1818
* List resource usage quotas by location.
1919
*
20-
* @param location the location like "eastus".
20+
* @param location The location name.
2121
* @throws IllegalArgumentException thrown if parameters fail the validation.
2222
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2323
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -30,7 +30,7 @@ public interface UsagesClient {
3030
/**
3131
* List resource usage quotas by location.
3232
*
33-
* @param location the location like "eastus".
33+
* @param location The location name.
3434
* @param context The context to associate with this operation.
3535
* @throws IllegalArgumentException thrown if parameters fail the validation.
3636
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.

0 commit comments

Comments
 (0)