Skip to content

Commit

Permalink
CodeGen from PR 29086 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge bcd6b6d50466b2ff9ec8d499ad52afaf28ff9657 into f2b603440c0c890cbaf6ddb1e6976bfcf14aa495
  • Loading branch information
SDKAuto committed May 23, 2024
1 parent bca73d9 commit 7b33c47
Show file tree
Hide file tree
Showing 277 changed files with 7,092 additions and 13,387 deletions.
4 changes: 3 additions & 1 deletion sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.9 (Unreleased)
## 1.0.0-beta.1 (2024-05-23)

- Azure Resource Manager SignalR client library for Java. This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR 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).

### Features Added

Expand Down
4 changes: 2 additions & 2 deletions sdk/signalr/azure-resourcemanager-signalr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager SignalR client library for Java.

This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2023-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR 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).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-signalr</artifactId>
<version>1.0.0-beta.8</version>
<version>1.0.0-beta.9</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
724 changes: 394 additions & 330 deletions sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions sdk/signalr/azure-resourcemanager-signalr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for SignalR Management</name>
<description>This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2023-08-01-preview.</description>
<description>This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2024-03-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.26.0-beta.1</version> <!-- {x-version-update;unreleased_com.azure:azure-core-test;dependency} -->
<version>1.25.0</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -88,8 +88,6 @@
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release -->
<!-- of Mockito supporting Java 8 as a baseline. -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
Expand All @@ -30,6 +30,7 @@
import com.azure.resourcemanager.signalr.implementation.SignalRManagementClientBuilder;
import com.azure.resourcemanager.signalr.implementation.SignalRPrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.signalr.implementation.SignalRPrivateLinkResourcesImpl;
import com.azure.resourcemanager.signalr.implementation.SignalRReplicaSharedPrivateLinkResourcesImpl;
import com.azure.resourcemanager.signalr.implementation.SignalRReplicasImpl;
import com.azure.resourcemanager.signalr.implementation.SignalRSharedPrivateLinkResourcesImpl;
import com.azure.resourcemanager.signalr.implementation.SignalRsImpl;
Expand All @@ -40,8 +41,9 @@
import com.azure.resourcemanager.signalr.models.SignalRPrivateEndpointConnections;
import com.azure.resourcemanager.signalr.models.SignalRPrivateLinkResources;
import com.azure.resourcemanager.signalr.models.SignalRReplicas;
import com.azure.resourcemanager.signalr.models.SignalRSharedPrivateLinkResources;
import com.azure.resourcemanager.signalr.models.SignalRReplicaSharedPrivateLinkResources;
import com.azure.resourcemanager.signalr.models.SignalRs;
import com.azure.resourcemanager.signalr.models.SignalRSharedPrivateLinkResources;
import com.azure.resourcemanager.signalr.models.Usages;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
Expand All @@ -50,7 +52,10 @@
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to SignalRManager. REST API for Azure SignalR Service. */
/**
* Entry point to SignalRManager.
* REST API for Azure SignalR Service.
*/
public final class SignalRManager {
private Operations operations;

Expand All @@ -68,25 +73,25 @@ public final class SignalRManager {

private SignalRReplicas signalRReplicas;

private SignalRReplicaSharedPrivateLinkResources signalRReplicaSharedPrivateLinkResources;

private SignalRSharedPrivateLinkResources signalRSharedPrivateLinkResources;

private final SignalRManagementClient clientObject;

private SignalRManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new SignalRManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
this.clientObject = new SignalRManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
}

/**
* Creates an instance of SignalR service API entry point.
*
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the SignalR service API instance.
Expand All @@ -99,7 +104,7 @@ public static SignalRManager authenticate(TokenCredential credential, AzureProfi

/**
* Creates an instance of SignalR service API entry point.
*
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the SignalR service API instance.
Expand All @@ -112,14 +117,16 @@ public static SignalRManager authenticate(HttpPipeline httpPipeline, AzureProfil

/**
* Gets a Configurable instance that can be used to create SignalRManager with optional configuration.
*
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new SignalRManager.Configurable();
}

/** The Configurable allowing configurations to be set. */
/**
* The Configurable allowing configurations to be set.
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

Expand Down Expand Up @@ -191,8 +198,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
* <p>
* This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
Expand All @@ -209,8 +216,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
this.defaultPollInterval
= Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
Expand All @@ -230,15 +237,13 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.signalr")
.append("/")
.append("1.0.0-beta.8");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
Expand All @@ -263,38 +268,28 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
new HttpPipelineBuilder()
.httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
return new SignalRManager(httpPipeline, profile, defaultPollInterval);
}
}

/**
* Gets the resource collection API of Operations.
*
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
Expand All @@ -306,7 +301,7 @@ public Operations operations() {

/**
* Gets the resource collection API of SignalRs. It manages SignalRResource.
*
*
* @return Resource collection API of SignalRs.
*/
public SignalRs signalRs() {
Expand All @@ -318,7 +313,7 @@ public SignalRs signalRs() {

/**
* Gets the resource collection API of Usages.
*
*
* @return Resource collection API of Usages.
*/
public Usages usages() {
Expand All @@ -330,20 +325,20 @@ public Usages usages() {

/**
* Gets the resource collection API of SignalRCustomCertificates. It manages CustomCertificate.
*
*
* @return Resource collection API of SignalRCustomCertificates.
*/
public SignalRCustomCertificates signalRCustomCertificates() {
if (this.signalRCustomCertificates == null) {
this.signalRCustomCertificates =
new SignalRCustomCertificatesImpl(clientObject.getSignalRCustomCertificates(), this);
this.signalRCustomCertificates
= new SignalRCustomCertificatesImpl(clientObject.getSignalRCustomCertificates(), this);
}
return signalRCustomCertificates;
}

/**
* Gets the resource collection API of SignalRCustomDomains. It manages CustomDomain.
*
*
* @return Resource collection API of SignalRCustomDomains.
*/
public SignalRCustomDomains signalRCustomDomains() {
Expand All @@ -355,33 +350,33 @@ public SignalRCustomDomains signalRCustomDomains() {

/**
* Gets the resource collection API of SignalRPrivateEndpointConnections.
*
*
* @return Resource collection API of SignalRPrivateEndpointConnections.
*/
public SignalRPrivateEndpointConnections signalRPrivateEndpointConnections() {
if (this.signalRPrivateEndpointConnections == null) {
this.signalRPrivateEndpointConnections =
new SignalRPrivateEndpointConnectionsImpl(clientObject.getSignalRPrivateEndpointConnections(), this);
this.signalRPrivateEndpointConnections
= new SignalRPrivateEndpointConnectionsImpl(clientObject.getSignalRPrivateEndpointConnections(), this);
}
return signalRPrivateEndpointConnections;
}

/**
* Gets the resource collection API of SignalRPrivateLinkResources.
*
*
* @return Resource collection API of SignalRPrivateLinkResources.
*/
public SignalRPrivateLinkResources signalRPrivateLinkResources() {
if (this.signalRPrivateLinkResources == null) {
this.signalRPrivateLinkResources =
new SignalRPrivateLinkResourcesImpl(clientObject.getSignalRPrivateLinkResources(), this);
this.signalRPrivateLinkResources
= new SignalRPrivateLinkResourcesImpl(clientObject.getSignalRPrivateLinkResources(), this);
}
return signalRPrivateLinkResources;
}

/**
* Gets the resource collection API of SignalRReplicas. It manages Replica.
*
*
* @return Resource collection API of SignalRReplicas.
*/
public SignalRReplicas signalRReplicas() {
Expand All @@ -392,22 +387,36 @@ public SignalRReplicas signalRReplicas() {
}

/**
* Gets the resource collection API of SignalRSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
*
* Gets the resource collection API of SignalRReplicaSharedPrivateLinkResources. It manages
* SharedPrivateLinkResource.
*
* @return Resource collection API of SignalRReplicaSharedPrivateLinkResources.
*/
public SignalRReplicaSharedPrivateLinkResources signalRReplicaSharedPrivateLinkResources() {
if (this.signalRReplicaSharedPrivateLinkResources == null) {
this.signalRReplicaSharedPrivateLinkResources = new SignalRReplicaSharedPrivateLinkResourcesImpl(
clientObject.getSignalRReplicaSharedPrivateLinkResources(), this);
}
return signalRReplicaSharedPrivateLinkResources;
}

/**
* Gets the resource collection API of SignalRSharedPrivateLinkResources.
*
* @return Resource collection API of SignalRSharedPrivateLinkResources.
*/
public SignalRSharedPrivateLinkResources signalRSharedPrivateLinkResources() {
if (this.signalRSharedPrivateLinkResources == null) {
this.signalRSharedPrivateLinkResources =
new SignalRSharedPrivateLinkResourcesImpl(clientObject.getSignalRSharedPrivateLinkResources(), this);
this.signalRSharedPrivateLinkResources
= new SignalRSharedPrivateLinkResourcesImpl(clientObject.getSignalRSharedPrivateLinkResources(), this);
}
return signalRSharedPrivateLinkResources;
}

/**
* Gets wrapped service client SignalRManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
*
* @return Wrapped service client SignalRManagementClient.
*/
public SignalRManagementClient serviceClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.signalr.fluent.models.OperationInner;

/** An instance of this class provides access to all the operations defined in OperationsClient. */
/**
* An instance of this class provides access to all the operations defined in OperationsClient.
*/
public interface OperationsClient {
/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
Expand All @@ -24,7 +26,7 @@ public interface OperationsClient {

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
*
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
Expand Down
Loading

0 comments on commit 7b33c47

Please sign in to comment.