();
- private final ClientLogger logger = new ClientLogger(MixedRealityStsClientBuilder.class);
-
- private String accountDomain;
- private String accountId;
- private MixedRealityStsServiceVersion apiVersion;
- private ClientOptions clientOptions;
- private Configuration configuration;
- private String endpoint;
- private HttpClient httpClient;
- private AzureKeyCredential keyCredential;
- private HttpLogOptions logOptions = new HttpLogOptions();
- private HttpPipeline pipeline;
- private RetryPolicy retryPolicy;
- private RetryOptions retryOptions;
- private TokenCredential tokenCredential;
-
- /**
- * Constructs a new builder used to configure and build {@link MixedRealityStsClient MixedRealityStsClients} and
- * {@link MixedRealityStsAsyncClient MixedRealityStsAsyncClients}.
- */
- public MixedRealityStsClientBuilder() {
- }
-
- /**
- * Sets the Mixed Reality service account domain.
- *
- * @param accountDomain The Mixed Reality service account domain.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- * @throws IllegalArgumentException If {@code accountDomain} is null or empty.
- */
- public MixedRealityStsClientBuilder accountDomain(String accountDomain) {
- Objects.requireNonNull(accountDomain, "'accountDomain' cannot be null.");
-
- if (accountDomain.isEmpty()) {
- throw logger
- .logExceptionAsError(new IllegalArgumentException("'accountDomain' cannot be an empty string."));
- }
-
- this.accountDomain = accountDomain;
-
- return this;
- }
-
- /**
- * Sets the Mixed Reality service account identifier.
- *
- * @param accountId The Mixed Reality service account identifier. The value is expected to be in UUID format.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- * @throws IllegalArgumentException If {@code accountId} is null or empty.
- */
- public MixedRealityStsClientBuilder accountId(String accountId) {
- Objects.requireNonNull(accountId, "'accountId' cannot be null.");
-
- if (accountId.isEmpty()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'accountId' cannot be an empty string."));
- }
-
- this.accountId = accountId;
-
- return this;
- }
-
- /**
- * Adds a {@link HttpPipelinePolicy pipeline policy} to apply on each request sent.
- *
- * Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * @param customPolicy A {@link HttpPipelinePolicy pipeline policy}.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- */
- @Override
- public MixedRealityStsClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
- this.customPolicies.add(Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."));
-
- return this;
- }
-
- /**
- * Create a {@link MixedRealityStsClient} based on options set in the builder. Every time {@code buildClient()} is
- * called a new instance of {@link MixedRealityStsClient} is created.
- *
- * @return A {@link MixedRealityStsClient} with the options set from the builder.
- * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)}
- * and {@link #retryPolicy(RetryPolicy)} have been set.
- */
- public MixedRealityStsClient buildClient() {
- return new MixedRealityStsClient(this.buildAsyncClient());
- }
-
- /**
- * Create a {@link MixedRealityStsAsyncClient} based on options set in the builder. Every time {@code buildAsyncClient()} is
- * called a new instance of {@link MixedRealityStsAsyncClient} is created.
- *
- * @return A {@link MixedRealityStsAsyncClient} with the options set from the builder.
- * @throws NullPointerException If any required values are null.
- * @throws IllegalArgumentException If the accountId or endpoint are not properly formatted.
- * @throws IllegalStateException If both {@link #retryOptions(RetryOptions)}
- * and {@link #retryPolicy(RetryPolicy)} have been set.
- */
- public MixedRealityStsAsyncClient buildAsyncClient() {
- Objects.requireNonNull(this.accountId, "The 'accountId' has not been set and is required.");
- Objects.requireNonNull(this.accountDomain, "The 'accountDomain' has not been set and is required.");
-
- UUID accountId;
- try {
- accountId = UUID.fromString(this.accountId);
- } catch (IllegalArgumentException ex) {
- throw logger.logExceptionAsWarning(
- new IllegalArgumentException("The 'accountId' must be a UUID formatted value.", ex));
- }
-
- String endpoint;
- if (this.endpoint != null) {
- try {
- new URL(this.endpoint);
- endpoint = this.endpoint;
- } catch (MalformedURLException ex) {
- throw logger
- .logExceptionAsWarning(new IllegalArgumentException("The 'endpoint' must be a valid URL.", ex));
- }
- } else {
- endpoint = AuthenticationEndpoint.constructFromDomain(this.accountDomain);
- }
-
- if (this.pipeline == null) {
- if (this.tokenCredential != null && this.keyCredential != null) {
- throw logger.logExceptionAsWarning(
- new IllegalArgumentException("Only a single type of credential may be specified."));
- }
-
- if (this.tokenCredential == null && this.keyCredential != null) {
- this.tokenCredential = new MixedRealityAccountKeyCredential(accountId, this.keyCredential);
- }
-
- Objects.requireNonNull(this.tokenCredential, "The 'credential' has not been set and is required.");
- String scope = AuthenticationEndpoint.constructScope(endpoint);
- HttpPipelinePolicy authPolicy = new BearerTokenAuthenticationPolicy(this.tokenCredential, scope);
- this.pipeline = createHttpPipeline(this.httpClient, authPolicy, this.customPolicies);
- }
-
- MixedRealityStsServiceVersion version;
-
- if (this.apiVersion != null) {
- version = this.apiVersion;
- } else {
- version = MixedRealityStsServiceVersion.getLatest();
- }
-
- MixedRealityStsRestClientImpl serviceClient
- = new MixedRealityStsRestClientImplBuilder().apiVersion(version.getVersion())
- .pipeline(this.pipeline)
- .host(endpoint)
- .buildClient();
-
- return new MixedRealityStsAsyncClient(accountId, serviceClient);
- }
-
- /**
- * Allows for setting common properties such as application ID, headers, proxy configuration, etc. Note that it is
- * recommended that this method be called with an instance of the {@link HttpClientOptions}
- * class (a subclass of the {@link ClientOptions} base class). The HttpClientOptions subclass provides more
- * configuration options suitable for HTTP clients, which is applicable for any class that implements this HttpTrait
- * interface.
- *
- * Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * @param clientOptions A configured instance of {@link HttpClientOptions}.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- * @see HttpClientOptions
- */
- @Override
- public MixedRealityStsClientBuilder clientOptions(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
-
- return this;
- }
-
- /**
- * Sets the {@link TokenCredential} used to authorize requests sent to the service. Refer to the Azure SDK for Java
- * identity and authentication
- * documentation for more details on proper usage of the {@link TokenCredential} type.
- *
- * @param tokenCredential {@link TokenCredential} used to authorize requests sent to the service.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- * @throws NullPointerException If {@code tokenCredential} is null.
- */
- @Override
- public MixedRealityStsClientBuilder credential(TokenCredential tokenCredential) {
- this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null.");
-
- return this;
- }
-
- /**
- * Sets the {@link AzureKeyCredential} used to authenticate HTTP requests.
- *
- *
- * Note: Not recommended for production applications.
- *
- * @param keyCredential The {@link AzureKeyCredential} used to authenticate HTTP requests.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- * @throws NullPointerException If {@code keyCredential} is null.
- */
- @Override
- public MixedRealityStsClientBuilder credential(AzureKeyCredential keyCredential) {
- this.keyCredential = Objects.requireNonNull(keyCredential, "'keyCredential' cannot be null.");
-
- return this;
- }
-
- /**
- * Sets the configuration store that is used during construction of the service client.
- *
- * The default configuration store is a clone of the {@link Configuration#getGlobalConfiguration() global
- * configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction.
- *
- * @param configuration The configuration store used to
- * @return The updated MixedRealityStsClientBuilder object.
- */
- @Override
- public MixedRealityStsClientBuilder configuration(Configuration configuration) {
- this.configuration = configuration;
-
- return this;
- }
-
- /**
- * Sets the Mixed Reality STS service endpoint.
- *
- * @param endpoint The Mixed Reality STS service endpoint.
- * @return The updated MixedRealityStsClientBuilder object.
- * @throws IllegalArgumentException If {@code endpoint} is null or it cannot be parsed into a valid URL.
- */
- @Override
- public MixedRealityStsClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
-
- return this;
- }
-
- /**
- * Sets the {@link HttpClient} to use for sending and receiving requests to and from the service.
- *
- *
Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * @param client The {@link HttpClient} to use for requests.
- * @return The updated ConfigurationClientBuilder object.
- */
- @Override
- public MixedRealityStsClientBuilder httpClient(HttpClient client) {
- if (this.httpClient != null && client == null) {
- logger.info("HttpClient is being set to 'null' when it was previously configured.");
- }
-
- this.httpClient = client;
-
- return this;
- }
-
- /**
- * Sets the {@link HttpLogOptions logging configuration} to use when sending and receiving requests to and from
- * the service. If a {@code logLevel} is not provided, default value of {@link HttpLogDetailLevel#NONE} is set.
- *
- * Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * @param logOptions The {@link HttpLogOptions logging configuration} to use when sending and receiving requests to
- * and from the service.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- */
- @Override
- public MixedRealityStsClientBuilder httpLogOptions(HttpLogOptions logOptions) {
- this.logOptions = Objects.requireNonNull(logOptions, "'logOptions' cannot be null.");
-
- return this;
- }
-
- /**
- * Sets the {@link HttpPipeline} to use for the service client.
- *
- * Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * If {@code pipeline} is set, all other settings are ignored, aside from {@link
- * MixedRealityStsClientBuilder#endpoint(String) endpoint} to build {@link MixedRealityStsAsyncClient} or {@link
- * MixedRealityStsClient}.
- *
- * @param pipeline {@link HttpPipeline} to use for sending service requests and receiving responses.
- * @return The updated {@link MixedRealityStsClientBuilder} object.
- */
- @Override
- public MixedRealityStsClientBuilder pipeline(HttpPipeline pipeline) {
- if (this.pipeline != null && pipeline == null) {
- logger.info("HttpPipeline is being set to 'null' when it was previously configured.");
- }
-
- this.pipeline = pipeline;
-
- return this;
- }
-
- /**
- * Sets the {@link RetryPolicy} that is used to retry requests.
- *
- * The default retry policy will be used if not provided {@link MixedRealityStsClientBuilder#buildAsyncClient()} to
- * build {@link MixedRealityStsAsyncClient} or {@link MixedRealityStsClient}.
- *
- * Setting this is mutually exclusive with using {@link #retryOptions(RetryOptions)}.
- *
- * @param retryPolicy The {@link RetryPolicy} that will be used to retry requests.
- * @return The updated MixedRealityStsClientBuilder object.
- */
- public MixedRealityStsClientBuilder retryPolicy(RetryPolicy retryPolicy) {
- this.retryPolicy = retryPolicy;
-
- return this;
- }
-
- /**
- * Sets the {@link RetryOptions} for all the requests made through the client.
- *
- *
Note: It is important to understand the precedence order of the HttpTrait APIs. In
- * particular, if a {@link HttpPipeline} is specified, this takes precedence over all other APIs in the trait, and
- * they will be ignored. If no {@link HttpPipeline} is specified, a HTTP pipeline will be constructed internally
- * based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this
- * trait that are also ignored if an {@link HttpPipeline} is specified, so please be sure to refer to the
- * documentation of types that implement this trait to understand the full set of implications.
- *
- * Setting this is mutually exclusive with using {@link #retryPolicy(RetryPolicy)}.
- *
- * @param retryOptions The {@link RetryOptions} to use for all the requests made through the client.
- * @return The updated MixedRealityStsClientBuilder object.
- */
- @Override
- public MixedRealityStsClientBuilder retryOptions(RetryOptions retryOptions) {
- this.retryOptions = retryOptions;
- return this;
- }
-
- /**
- * Sets the {@link MixedRealityStsServiceVersion} that is used when making API requests.
- *
- * If a service version is not provided, the service version that will be used will be the latest known service
- * version based on the version of the client library being used. If no service version is specified, updating to a
- * newer version the client library will have the result of potentially moving to a newer service version.
- *
- * @param version {@link MixedRealityStsServiceVersion} of the service to be used when making requests.
- * @return The updated ConfigurationClientBuilder object.
- */
- public MixedRealityStsClientBuilder serviceVersion(MixedRealityStsServiceVersion version) {
- this.apiVersion = version;
-
- return this;
- }
-
- private void applyRequiredPolicies(List policies) {
- policies.add(getUserAgentPolicy());
-
- // If client options has headers configured, add a policy for each.
- if (this.clientOptions != null) {
- List httpHeaderList = new ArrayList<>();
- this.clientOptions.getHeaders()
- .forEach(header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
- policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
- }
-
- policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions));
- policies.add(new CookiePolicy());
- policies.add(new HttpLoggingPolicy(this.logOptions));
- }
-
- private HttpPipeline createHttpPipeline(HttpClient httpClient, HttpPipelinePolicy authorizationPolicy,
- List additionalPolicies) {
-
- List policies = new ArrayList();
- policies.add(authorizationPolicy);
- applyRequiredPolicies(policies);
-
- if (additionalPolicies != null && additionalPolicies.size() > 0) {
- policies.addAll(additionalPolicies);
- }
-
- return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
- .httpClient(httpClient)
- .tracer(createTracer())
- .build();
- }
-
- /*
- * Creates a {@link UserAgentPolicy} using the default service module name and version.
- *
- * @return The default {@link UserAgentPolicy} for the module.
- */
- private UserAgentPolicy getUserAgentPolicy() {
- // Give precedence to applicationId configured in clientOptions over the one configured in httpLogOptions.
- // Azure.Core deprecated setting the applicationId in httpLogOptions, but we should still support it.
- String applicationId
- = this.clientOptions == null ? this.logOptions.getApplicationId() : this.clientOptions.getApplicationId();
-
- return new UserAgentPolicy(applicationId, CLIENT_NAME, CLIENT_VERSION, this.configuration);
- }
-
- private Tracer createTracer() {
- TracingOptions tracingOptions = null;
- if (clientOptions != null) {
- tracingOptions = clientOptions.getTracingOptions();
- }
-
- return TracerProvider.getDefaultProvider()
- .createTracer(CLIENT_NAME, CLIENT_VERSION, MIXED_REALITY_TRACING_NAMESPACE_VALUE, tracingOptions);
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/MixedRealityStsServiceVersion.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/MixedRealityStsServiceVersion.java
deleted file mode 100644
index 3c683a507073..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/MixedRealityStsServiceVersion.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.util.ServiceVersion;
-
-/**
- * The versions of the Azure Mixed Reality STS supported by this client library.
- */
-public enum MixedRealityStsServiceVersion implements ServiceVersion {
- /**
- * Service version {@code 2019-02-28-preview}.
- */
- V2019_02_28_PREVIEW("2019-02-28-preview");
-
- private final String version;
-
- MixedRealityStsServiceVersion(String version) {
- this.version = version;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getVersion() {
- return this.version;
- }
-
- /**
- * Gets the latest service version supported by this client library.
- *
- * @return the latest {@link MixedRealityStsServiceVersion}
- */
- public static MixedRealityStsServiceVersion getLatest() {
- return V2019_02_28_PREVIEW;
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java
deleted file mode 100644
index 00d195812751..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImpl.java
+++ /dev/null
@@ -1,288 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.exception.HttpResponseException;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.RetryPolicy;
-import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.ResponseBase;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.core.util.serializer.SerializerAdapter;
-import com.azure.mixedreality.authentication.implementation.models.GetTokenHeaders;
-import com.azure.mixedreality.authentication.implementation.models.StsTokenResponseMessage;
-import com.azure.mixedreality.authentication.implementation.models.TokenRequestOptions;
-import java.util.UUID;
-import reactor.core.publisher.Mono;
-
-/**
- * Initializes a new instance of the MixedRealityStsRestClient type.
- */
-public final class MixedRealityStsRestClientImpl {
- /**
- * The proxy service used to perform REST calls.
- */
- private final MixedRealityStsRestClientService service;
-
- /**
- * server parameter.
- */
- private final String host;
-
- /**
- * Gets server parameter.
- *
- * @return the host value.
- */
- public String getHost() {
- return this.host;
- }
-
- /**
- * Api Version.
- */
- private final String apiVersion;
-
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- public String getApiVersion() {
- return this.apiVersion;
- }
-
- /**
- * The HTTP pipeline to send requests through.
- */
- private final HttpPipeline httpPipeline;
-
- /**
- * Gets The HTTP pipeline to send requests through.
- *
- * @return the httpPipeline value.
- */
- public HttpPipeline getHttpPipeline() {
- return this.httpPipeline;
- }
-
- /**
- * The serializer to serialize an object into a string.
- */
- private final SerializerAdapter serializerAdapter;
-
- /**
- * Gets The serializer to serialize an object into a string.
- *
- * @return the serializerAdapter value.
- */
- public SerializerAdapter getSerializerAdapter() {
- return this.serializerAdapter;
- }
-
- /**
- * Initializes an instance of MixedRealityStsRestClient client.
- *
- * @param host server parameter.
- * @param apiVersion Api Version.
- */
- MixedRealityStsRestClientImpl(String host, String apiVersion) {
- this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
- JacksonAdapter.createDefaultSerializerAdapter(), host, apiVersion);
- }
-
- /**
- * Initializes an instance of MixedRealityStsRestClient client.
- *
- * @param httpPipeline The HTTP pipeline to send requests through.
- * @param host server parameter.
- * @param apiVersion Api Version.
- */
- MixedRealityStsRestClientImpl(HttpPipeline httpPipeline, String host, String apiVersion) {
- this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), host, apiVersion);
- }
-
- /**
- * Initializes an instance of MixedRealityStsRestClient client.
- *
- * @param httpPipeline The HTTP pipeline to send requests through.
- * @param serializerAdapter The serializer to serialize an object into a string.
- * @param host server parameter.
- * @param apiVersion Api Version.
- */
- MixedRealityStsRestClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String host,
- String apiVersion) {
- this.httpPipeline = httpPipeline;
- this.serializerAdapter = serializerAdapter;
- this.host = host;
- this.apiVersion = apiVersion;
- this.service
- = RestProxy.create(MixedRealityStsRestClientService.class, this.httpPipeline, this.getSerializerAdapter());
- }
-
- /**
- * The interface defining all the services for MixedRealityStsRestClient to be used by the proxy service to perform
- * REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "MixedRealityStsRestClient")
- public interface MixedRealityStsRestClientService {
- @Get("/Accounts/{accountId}/token")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = HttpResponseException.class, code = { 400, 401, 429 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getToken(@HostParam("$host") String host,
- @PathParam("accountId") UUID accountId, @HeaderParam("X-MRC-CV") String clientRequestId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Get("/Accounts/{accountId}/token")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(value = HttpResponseException.class, code = { 400, 401, 429 })
- @UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> getTokenNoCustomHeaders(@HostParam("$host") String host,
- @PathParam("accountId") UUID accountId, @HeaderParam("X-MRC-CV") String clientRequestId,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services along with {@link ResponseBase} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTokenWithResponseAsync(UUID accountId,
- TokenRequestOptions tokenRequestOptions) {
- return FluxUtil.withContext(context -> getTokenWithResponseAsync(accountId, tokenRequestOptions, context));
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services along with {@link ResponseBase} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTokenWithResponseAsync(UUID accountId,
- TokenRequestOptions tokenRequestOptions, Context context) {
- final String accept = "application/json";
- String clientRequestIdInternal = null;
- if (tokenRequestOptions != null) {
- clientRequestIdInternal = tokenRequestOptions.getClientRequestId();
- }
- String clientRequestId = clientRequestIdInternal;
- return service.getToken(this.getHost(), accountId, clientRequestId, this.getApiVersion(), accept, context);
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono getTokenAsync(UUID accountId, TokenRequestOptions tokenRequestOptions) {
- return getTokenWithResponseAsync(accountId, tokenRequestOptions)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono getTokenAsync(UUID accountId, TokenRequestOptions tokenRequestOptions,
- Context context) {
- return getTokenWithResponseAsync(accountId, tokenRequestOptions, context)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTokenNoCustomHeadersWithResponseAsync(UUID accountId,
- TokenRequestOptions tokenRequestOptions) {
- return FluxUtil
- .withContext(context -> getTokenNoCustomHeadersWithResponseAsync(accountId, tokenRequestOptions, context));
- }
-
- /**
- * Gets an access token to be used with Mixed Reality services.
- *
- * @param accountId The Mixed Reality account identifier.
- * @param tokenRequestOptions Parameter group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws HttpResponseException thrown if the request is rejected by server on status code 400, 401, 429.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an access token to be used with Mixed Reality services along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTokenNoCustomHeadersWithResponseAsync(UUID accountId,
- TokenRequestOptions tokenRequestOptions, Context context) {
- final String accept = "application/json";
- String clientRequestIdInternal = null;
- if (tokenRequestOptions != null) {
- clientRequestIdInternal = tokenRequestOptions.getClientRequestId();
- }
- String clientRequestId = clientRequestIdInternal;
- return service.getTokenNoCustomHeaders(this.getHost(), accountId, clientRequestId, this.getApiVersion(), accept,
- context);
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java
deleted file mode 100644
index 984aeed86c69..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/MixedRealityStsRestClientImplBuilder.java
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.ServiceClientBuilder;
-import com.azure.core.client.traits.ConfigurationTrait;
-import com.azure.core.client.traits.HttpTrait;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-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.AddHeadersPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
-import com.azure.core.http.policy.HttpLoggingPolicy;
-import com.azure.core.http.policy.HttpPipelinePolicy;
-import com.azure.core.http.policy.HttpPolicyProviders;
-import com.azure.core.http.policy.RequestIdPolicy;
-import com.azure.core.http.policy.RetryOptions;
-import com.azure.core.http.policy.RetryPolicy;
-import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.util.ClientOptions;
-import com.azure.core.util.Configuration;
-import com.azure.core.util.CoreUtils;
-import com.azure.core.util.builder.ClientBuilderUtil;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.core.util.serializer.SerializerAdapter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * A builder for creating a new instance of the MixedRealityStsRestClient type.
- */
-@ServiceClientBuilder(serviceClients = { MixedRealityStsRestClientImpl.class })
-public final class MixedRealityStsRestClientImplBuilder implements HttpTrait,
- ConfigurationTrait {
- @Generated
- private static final String SDK_NAME = "name";
-
- @Generated
- private static final String SDK_VERSION = "version";
-
- @Generated
- private static final Map PROPERTIES = new HashMap<>();
-
- @Generated
- private final List pipelinePolicies;
-
- /**
- * Create an instance of the MixedRealityStsRestClientImplBuilder.
- */
- @Generated
- public MixedRealityStsRestClientImplBuilder() {
- this.pipelinePolicies = new ArrayList<>();
- }
-
- /*
- * The HTTP client used to send the request.
- */
- @Generated
- private HttpClient httpClient;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder httpClient(HttpClient httpClient) {
- this.httpClient = httpClient;
- return this;
- }
-
- /*
- * The HTTP pipeline to send requests through.
- */
- @Generated
- private HttpPipeline pipeline;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder pipeline(HttpPipeline pipeline) {
- if (this.pipeline != null && pipeline == null) {
- LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
- }
- this.pipeline = pipeline;
- return this;
- }
-
- /*
- * The logging configuration for HTTP requests and responses.
- */
- @Generated
- private HttpLogOptions httpLogOptions;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
- this.httpLogOptions = httpLogOptions;
- return this;
- }
-
- /*
- * The client options such as application ID and custom headers to set on a request.
- */
- @Generated
- private ClientOptions clientOptions;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder clientOptions(ClientOptions clientOptions) {
- this.clientOptions = clientOptions;
- return this;
- }
-
- /*
- * The retry options to configure retry policy for failed requests.
- */
- @Generated
- private RetryOptions retryOptions;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder retryOptions(RetryOptions retryOptions) {
- this.retryOptions = retryOptions;
- return this;
- }
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder addPolicy(HttpPipelinePolicy customPolicy) {
- Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null.");
- pipelinePolicies.add(customPolicy);
- return this;
- }
-
- /*
- * The configuration store that is used during construction of the service client.
- */
- @Generated
- private Configuration configuration;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public MixedRealityStsRestClientImplBuilder configuration(Configuration configuration) {
- this.configuration = configuration;
- return this;
- }
-
- /*
- * server parameter
- */
- @Generated
- private String host;
-
- /**
- * Sets server parameter.
- *
- * @param host the host value.
- * @return the MixedRealityStsRestClientImplBuilder.
- */
- @Generated
- public MixedRealityStsRestClientImplBuilder host(String host) {
- this.host = host;
- return this;
- }
-
- /*
- * Api Version
- */
- @Generated
- private String apiVersion;
-
- /**
- * Sets Api Version.
- *
- * @param apiVersion the apiVersion value.
- * @return the MixedRealityStsRestClientImplBuilder.
- */
- @Generated
- public MixedRealityStsRestClientImplBuilder apiVersion(String apiVersion) {
- this.apiVersion = apiVersion;
- return this;
- }
-
- /*
- * The serializer to serialize an object into a string
- */
- @Generated
- private SerializerAdapter serializerAdapter;
-
- /**
- * Sets The serializer to serialize an object into a string.
- *
- * @param serializerAdapter the serializerAdapter value.
- * @return the MixedRealityStsRestClientImplBuilder.
- */
- @Generated
- public MixedRealityStsRestClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
- this.serializerAdapter = serializerAdapter;
- return this;
- }
-
- /*
- * The retry policy that will attempt to retry failed requests, if applicable.
- */
- @Generated
- private RetryPolicy retryPolicy;
-
- /**
- * Sets The retry policy that will attempt to retry failed requests, if applicable.
- *
- * @param retryPolicy the retryPolicy value.
- * @return the MixedRealityStsRestClientImplBuilder.
- */
- @Generated
- public MixedRealityStsRestClientImplBuilder retryPolicy(RetryPolicy retryPolicy) {
- this.retryPolicy = retryPolicy;
- return this;
- }
-
- /**
- * Builds an instance of MixedRealityStsRestClientImpl with the provided parameters.
- *
- * @return an instance of MixedRealityStsRestClientImpl.
- */
- @Generated
- public MixedRealityStsRestClientImpl buildClient() {
- this.validateClient();
- HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
- String localHost = (host != null) ? host : "https://sts.mixedreality.azure.com";
- String localApiVersion = (apiVersion != null) ? apiVersion : "2019-02-28-preview";
- SerializerAdapter localSerializerAdapter
- = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter();
- MixedRealityStsRestClientImpl client
- = new MixedRealityStsRestClientImpl(localPipeline, localSerializerAdapter, localHost, localApiVersion);
- return client;
- }
-
- @Generated
- private void validateClient() {
- // This method is invoked from 'buildInnerClient'/'buildClient' method.
- // Developer can customize this method, to validate that the necessary conditions are met for the new client.
- }
-
- @Generated
- private HttpPipeline createHttpPipeline() {
- Configuration buildConfiguration
- = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
- HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;
- ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;
- List policies = new ArrayList<>();
- String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName");
- String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
- String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);
- policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
- policies.add(new RequestIdPolicy());
- policies.add(new AddHeadersFromContextPolicy());
- HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions);
- if (headers != null) {
- policies.add(new AddHeadersPolicy(headers));
- }
- this.pipelinePolicies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
- .forEach(p -> policies.add(p));
- HttpPolicyProviders.addBeforeRetryPolicies(policies);
- policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
- policies.add(new AddDatePolicy());
- this.pipelinePolicies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .forEach(p -> policies.add(p));
- HttpPolicyProviders.addAfterRetryPolicies(policies);
- policies.add(new HttpLoggingPolicy(localHttpLogOptions));
- HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
- .httpClient(httpClient)
- .clientOptions(localClientOptions)
- .build();
- return httpPipeline;
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(MixedRealityStsRestClientImplBuilder.class);
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java
deleted file mode 100644
index 83441574e389..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenHeaders.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.Generated;
-import com.azure.core.http.HttpHeaderName;
-import com.azure.core.http.HttpHeaders;
-
-/**
- * The GetTokenHeaders model.
- */
-@Fluent
-public final class GetTokenHeaders {
- /*
- * The MS-CV property.
- */
- @Generated
- private String msCV;
-
- private static final HttpHeaderName MS_CV = HttpHeaderName.fromString("MS-CV");
-
- // HttpHeaders containing the raw property values.
- /**
- * Creates an instance of GetTokenHeaders class.
- *
- * @param rawHeaders The raw HttpHeaders that will be used to create the property values.
- */
- public GetTokenHeaders(HttpHeaders rawHeaders) {
- this.msCV = rawHeaders.getValue(MS_CV);
- }
-
- /**
- * Get the msCV property: The MS-CV property.
- *
- * @return the msCV value.
- */
- @Generated
- public String getMsCV() {
- return this.msCV;
- }
-
- /**
- * Set the msCV property: The MS-CV property.
- *
- * @param msCV the msCV value to set.
- * @return the GetTokenHeaders object itself.
- */
- @Generated
- public GetTokenHeaders setMsCV(String msCV) {
- this.msCV = msCV;
- return this;
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenResponse.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenResponse.java
deleted file mode 100644
index fc579ed26637..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/GetTokenResponse.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation.models;
-
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.rest.ResponseBase;
-
-/** Contains all response data for the getToken operation. */
-public final class GetTokenResponse extends ResponseBase {
- /**
- * Creates an instance of GetTokenResponse.
- *
- * @param request the request which resulted in this GetTokenResponse.
- * @param statusCode the status code of the HTTP response.
- * @param rawHeaders the raw headers of the HTTP response.
- * @param value the deserialized value of the HTTP response.
- * @param headers the deserialized headers of the HTTP response.
- */
- public GetTokenResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, StsTokenResponseMessage value,
- GetTokenHeaders headers) {
- super(request, statusCode, rawHeaders, value, headers);
- }
-
- /**
- * Gets the deserialized response body.
- *
- * @return the deserialized response body.
- */
- @Override
- public StsTokenResponseMessage getValue() {
- return super.getValue();
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java
deleted file mode 100644
index cdf9a25ce294..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/StsTokenResponseMessage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.Generated;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * Represents a token response message from the STS service.
- */
-@Fluent
-public final class StsTokenResponseMessage implements JsonSerializable {
- /*
- * An access token for the account.
- */
- @Generated
- private String accessToken;
-
- /**
- * Creates an instance of StsTokenResponseMessage class.
- */
- @Generated
- public StsTokenResponseMessage() {
- }
-
- /**
- * Get the accessToken property: An access token for the account.
- *
- * @return the accessToken value.
- */
- @Generated
- public String getAccessToken() {
- return this.accessToken;
- }
-
- /**
- * Set the accessToken property: An access token for the account.
- *
- * @param accessToken the accessToken value to set.
- * @return the StsTokenResponseMessage object itself.
- */
- @Generated
- public StsTokenResponseMessage setAccessToken(String accessToken) {
- this.accessToken = accessToken;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("AccessToken", this.accessToken);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of StsTokenResponseMessage from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of StsTokenResponseMessage if the JsonReader was pointing to an instance of it, or null if it
- * was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the StsTokenResponseMessage.
- */
- @Generated
- public static StsTokenResponseMessage fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- StsTokenResponseMessage deserializedStsTokenResponseMessage = new StsTokenResponseMessage();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("AccessToken".equals(fieldName)) {
- deserializedStsTokenResponseMessage.accessToken = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedStsTokenResponseMessage;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/TokenRequestOptions.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/TokenRequestOptions.java
deleted file mode 100644
index 1daef4c7be37..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/TokenRequestOptions.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.mixedreality.authentication.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.Generated;
-
-/**
- * Parameter group.
- */
-@Fluent
-public final class TokenRequestOptions {
- /*
- * The client request correlation vector, which should be set to a new value for each request. Useful when debugging
- * with Microsoft.
- */
- @Generated
- private String clientRequestId;
-
- /**
- * Creates an instance of TokenRequestOptions class.
- */
- @Generated
- public TokenRequestOptions() {
- }
-
- /**
- * Get the clientRequestId property: The client request correlation vector, which should be set to a new value for
- * each request. Useful when debugging with Microsoft.
- *
- * @return the clientRequestId value.
- */
- @Generated
- public String getClientRequestId() {
- return this.clientRequestId;
- }
-
- /**
- * Set the clientRequestId property: The client request correlation vector, which should be set to a new value for
- * each request. Useful when debugging with Microsoft.
- *
- * @param clientRequestId the clientRequestId value to set.
- * @return the TokenRequestOptions object itself.
- */
- @Generated
- public TokenRequestOptions setClientRequestId(String clientRequestId) {
- this.clientRequestId = clientRequestId;
- return this;
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java
deleted file mode 100644
index 8aa6330436b3..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/models/package-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-/**
- * Package containing the data models for MixedRealityStsRestClient.
- * Definition for the Mixed Reality Cloud STS service APIs.
- */
-package com.azure.mixedreality.authentication.implementation.models;
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java
deleted file mode 100644
index 13291cb51625..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/implementation/package-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-/**
- * Package containing the implementations for MixedRealityStsRestClient.
- * Definition for the Mixed Reality Cloud STS service APIs.
- */
-package com.azure.mixedreality.authentication.implementation;
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/package-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/package-info.java
deleted file mode 100644
index db2d5555deb1..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/com/azure/mixedreality/authentication/package-info.java
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-/**
- * Package containing classes used for retrieving access tokens from
- * the Mixed Reality STS service.
- */
-package com.azure.mixedreality.authentication;
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/module-info.java b/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/module-info.java
deleted file mode 100644
index 3fc2dc11c362..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/main/java/module-info.java
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-/**
- * Declares a module for Azure Mixed Reality Authentication.
- */
-module com.azure.mixedreality.authentication {
- requires transitive com.azure.core;
-
- exports com.azure.mixedreality.authentication;
-
- opens com.azure.mixedreality.authentication.implementation.models to com.azure.core;
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/samples/java/com/azure/mixedreality/authentication/GetToken.java b/sdk/mixedreality/azure-mixedreality-authentication/src/samples/java/com/azure/mixedreality/authentication/GetToken.java
deleted file mode 100644
index 2634448d7246..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/samples/java/com/azure/mixedreality/authentication/GetToken.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.credential.AzureKeyCredential;
-
-/**
- * Sample demonstrates how to get an access token from the Mixed Reality security
- * token service (STS).
- */
-public final class GetToken {
- /**
- * Runs the sample and demonstrates to get an access token from the Mixed
- * Reality security token service (STS).
- * @param args Unused. Arguments to the program.
- */
- public static void main(String[] args) {
- // You can get your account domain, Id, and key by viewing your Mixed
- // Reality resource in the Azure portal.
- final String accountDomain = "";
- final String accountId = "00000000-0000-0000-0000-000000000000";
- final String accountKey = "";
-
- AzureKeyCredential keyCredential = new AzureKeyCredential(accountKey);
- MixedRealityStsClient client = new MixedRealityStsClientBuilder()
- .accountDomain(accountDomain)
- .accountId(accountId)
- .credential(keyCredential)
- .buildClient();
-
- AccessToken token = client.getToken();
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/CorrelationVectorTests.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/CorrelationVectorTests.java
deleted file mode 100644
index b57d5df939a8..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/CorrelationVectorTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import org.junit.jupiter.api.Test;
-
-import java.util.UUID;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class CorrelationVectorTests {
- @Test
- public void generateCvBase() {
- String actual = CorrelationVector.generateCvBase();
-
- assertNotNull(actual);
- assertEquals(22, actual.length());
- }
-
- @Test
- public void generateCvBaseFromUUID() {
- UUID seedUuid = UUID.fromString("0d0cddc7-4eb1-4791-9870-b1a7413cecdf");
- String actual = CorrelationVector.generateCvBaseFromUUID(seedUuid);
-
- assertEquals("DQzdx06xR5GYcLGnQTzs3w", actual);
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/JsonWebTokenTests.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/JsonWebTokenTests.java
deleted file mode 100644
index 260845b2b11f..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/JsonWebTokenTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import org.junit.jupiter.api.Test;
-
-import java.time.OffsetDateTime;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-public class JsonWebTokenTests {
- @Test
- public void retrieveExpiration() {
- // Note: The trailing "." on the end indicates an empty signature indicating that this JWT is not signed.
- final String jwtValue
- = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6IkJvYkBjb250b3NvLmNvbSIsImdpdmVuX25hbWUiOiJCb2IiLCJpc3MiOiJodHRwOi8vRGVmYXVsdC5Jc3N1ZXIuY29tIiwiYXVkIjoiaHR0cDovL0RlZmF1bHQuQXVkaWVuY2UuY29tIiwiaWF0IjoiMTYxMDgxMjI1MCIsIm5iZiI6IjE2MTA4MTI1NTAiLCJleHAiOiIxNjEwODk4NjUwIn0.";
- final long expectedExpirationTimestamp = 1610898650; // 1/17/2021 3:50:50 PM UTC
-
- OffsetDateTime actual = JsonWebToken.retrieveExpiration(jwtValue);
-
- assertNotNull(actual);
-
- long actualTimestamp = actual.toEpochSecond();
-
- assertEquals(expectedExpirationTimestamp, actualTimestamp);
- }
-
- @Test
- public void retrieveExpirationWithBadJwt() {
- OffsetDateTime actual = JsonWebToken.retrieveExpiration("asdfasdfasdf");
-
- assertNull(actual);
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityAccountKeyCredentialTest.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityAccountKeyCredentialTest.java
deleted file mode 100644
index c68cdc355166..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityAccountKeyCredentialTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.credential.AzureKeyCredential;
-import org.junit.jupiter.api.Test;
-
-import java.time.OffsetDateTime;
-import java.util.UUID;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class MixedRealityAccountKeyCredentialTest {
- // NOT REAL: Just a new UUID.
- private final UUID accountId = UUID.fromString("3ff503e0-15ef-4be9-bd99-29e6026d4bf6");
-
- // NOT REAL: Base64 encoded accountId.
- private final AzureKeyCredential keyCredential
- = new AzureKeyCredential("M2ZmNTAzZTAtMTVlZi00YmU5LWJkOTktMjllNjAyNmQ0YmY2");
-
- @Test
- public void create() {
- MixedRealityAccountKeyCredential credential = new MixedRealityAccountKeyCredential(accountId, keyCredential);
-
- assertNotNull(credential);
- }
-
- @Test
- public void getToken() {
- String expectedAccessTokenValue
- = "3ff503e0-15ef-4be9-bd99-29e6026d4bf6:M2ZmNTAzZTAtMTVlZi00YmU5LWJkOTktMjllNjAyNmQ0YmY2";
- OffsetDateTime expectedExpiration = OffsetDateTime.MAX;
- MixedRealityAccountKeyCredential credential = new MixedRealityAccountKeyCredential(accountId, keyCredential);
-
- AccessToken token = credential.getToken(null).block();
-
- assertNotNull(token);
- assertEquals(expectedAccessTokenValue, token.getToken());
- assertEquals(expectedExpiration, token.getExpiresAt());
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsAsyncClientTests.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsAsyncClientTests.java
deleted file mode 100644
index da6840e17d96..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsAsyncClientTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-import reactor.test.StepVerifier;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class MixedRealityStsAsyncClientTests extends MixedRealityStsClientTestBase {
- private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]";
- private MixedRealityStsAsyncClient client;
-
- private void initializeClient(HttpClient httpClient) {
- client = new MixedRealityStsClientBuilder().accountId(super.getAccountId())
- .accountDomain(super.getAccountDomain())
- .pipeline(super.getHttpPipeline(httpClient))
- .buildAsyncClient();
- }
-
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void getToken(HttpClient httpClient) {
- // arrange
- initializeClient(httpClient);
-
- // act
- StepVerifier.create(this.client.getToken()).assertNext(actual -> {
- // assert
- assertNotNull(actual);
- assertNotNull(actual.getToken());
- assertNotNull(actual.getExpiresAt());
- }).verifyComplete();
- }
-
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void getTokenWithResponse(HttpClient httpClient) {
- // arrange
- initializeClient(httpClient);
-
- // act
- StepVerifier.create(this.client.getTokenWithResponse()).assertNext(actualResponse -> {
- // assert
- assertNotNull(actualResponse);
- assertEquals(200, actualResponse.getStatusCode());
-
- // act
- AccessToken actual = actualResponse.getValue();
-
- // assert
- assertNotNull(actual);
- assertNotNull(actual.getToken());
- assertNotNull(actual.getExpiresAt());
- }).verifyComplete();
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientBuilderTests.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientBuilderTests.java
deleted file mode 100644
index 6b4d25630e6c..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientBuilderTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AzureKeyCredential;
-import com.azure.core.http.policy.ExponentialBackoffOptions;
-import com.azure.core.http.policy.RetryOptions;
-import com.azure.core.http.policy.RetryPolicy;
-import com.azure.core.test.http.MockHttpResponse;
-import org.junit.jupiter.api.Test;
-import reactor.core.publisher.Mono;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-public class MixedRealityStsClientBuilderTests {
- private final String accountDomain = "mixedreality.azure.com";
- private final String accountId = "00000000-0000-0000-0000-000000000000";
- private final String accountKey = "00000000-0000-0000-0000-000000000000";
-
- @Test
- public void buildClient() {
-
- MixedRealityStsClient client = new MixedRealityStsClientBuilder().accountDomain(this.accountDomain)
- .accountId(this.accountId)
- .credential(new AzureKeyCredential(accountKey))
- .httpClient(request -> Mono.just(new MockHttpResponse(request, 200)))
- .buildClient();
-
- assertNotNull(client);
- }
-
- @Test
- public void buildClientMissingAccountDomain() {
-
- MixedRealityStsClientBuilder builder = new MixedRealityStsClientBuilder().accountId(this.accountId)
- .credential(new AzureKeyCredential(accountKey));
-
- NullPointerException exception = assertThrows(NullPointerException.class, builder::buildClient);
-
- assertEquals("The 'accountDomain' has not been set and is required.", exception.getMessage());
- }
-
- @Test
- public void buildClientMissingAccountId() {
-
- MixedRealityStsClientBuilder builder = new MixedRealityStsClientBuilder().accountDomain(this.accountDomain)
- .credential(new AzureKeyCredential(accountKey));
-
- NullPointerException exception = assertThrows(NullPointerException.class, builder::buildClient);
-
- assertEquals("The 'accountId' has not been set and is required.", exception.getMessage());
- }
-
- @Test
- public void buildClientMissingCredential() {
-
- MixedRealityStsClientBuilder builder
- = new MixedRealityStsClientBuilder().accountId(this.accountId).accountDomain(this.accountDomain);
-
- NullPointerException exception = assertThrows(NullPointerException.class, builder::buildClient);
-
- assertEquals("The 'credential' has not been set and is required.", exception.getMessage());
- }
-
- @Test
- public void bothRetryOptionsAndRetryPolicySet() {
- assertThrows(IllegalStateException.class,
- () -> new MixedRealityStsClientBuilder().accountDomain(this.accountDomain)
- .accountId(this.accountId)
- .credential(new AzureKeyCredential(accountKey))
- .retryOptions(new RetryOptions(new ExponentialBackoffOptions()))
- .retryPolicy(new RetryPolicy())
- .buildClient());
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTestBase.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTestBase.java
deleted file mode 100644
index 5b8e8e2e24f7..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTestBase.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AzureKeyCredential;
-import com.azure.core.credential.TokenCredential;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
-import com.azure.core.http.policy.HttpPipelinePolicy;
-import com.azure.core.test.TestProxyTestBase;
-import com.azure.core.test.models.CustomMatcher;
-import com.azure.core.test.models.BodilessMatcher;
-import com.azure.core.test.models.TestProxyRequestMatcher;
-import com.azure.core.test.models.TestProxySanitizer;
-import com.azure.core.test.models.TestProxySanitizerType;
-import com.azure.core.util.Configuration;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
-public class MixedRealityStsClientTestBase extends TestProxyTestBase {
- public static final String INVALID_DUMMY_TOKEN = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6IkJvYkBjb250b"
- + "3NvLmNvbSIsImdpdmVuX25hbWUiOiJCb2IiLCJpc3MiOiJodHRwOi8vRGVmYXVsdC5Jc3N1ZXIuY29tIiwiYXVkIjoiaHR0cDovL0RlZm"
- + "F1bHQuQXVkaWVuY2UuY29tIiwiaWF0IjoiMTYwNzk3ODY4MyIsIm5iZiI6IjE2MDc5Nzg2ODMiLCJleHAiOiIxNjA3OTc4OTgzIn0.";
- private final String accountDomain = Configuration.getGlobalConfiguration().get("MIXEDREALITY_ACCOUNT_DOMAIN");
- private final String accountId = Configuration.getGlobalConfiguration().get("MIXEDREALITY_ACCOUNT_ID");
- private final String accountKey = Configuration.getGlobalConfiguration().get("MIXEDREALITY_ACCOUNT_KEY");
-
- // NOT REAL ACCOUNT DETAILS
- private final String playbackAccountDomain = "mixedreality.azure.com";
- private final String playbackAccountId = "f5b3e69f-1e1b-46a5-a718-aea58a7a0f8e";
- private final String playbackAccountKey = "NjgzMjFkNWEtNzk3OC00Y2ViLWI4ODAtMGY0OTc1MWRhYWU5";
-
- HttpPipeline getHttpPipeline(HttpClient httpClient) {
- String accountId = getAccountId();
- String accountDomain = getAccountDomain();
- AzureKeyCredential keyCredential = getAccountKey();
-
- TokenCredential credential = constructAccountKeyCredential(accountId, keyCredential);
- String endpoint = AuthenticationEndpoint.constructFromDomain(accountDomain);
- String authenticationScope = AuthenticationEndpoint.constructScope(endpoint);
-
- final List policies = new ArrayList<>();
- policies.add(new BearerTokenAuthenticationPolicy(credential, authenticationScope));
-
- if (interceptorManager.isRecordMode() || interceptorManager.isPlaybackMode()) {
- List customSanitizers = new ArrayList<>();
- customSanitizers.add(
- new TestProxySanitizer("$..AccessToken", null, INVALID_DUMMY_TOKEN, TestProxySanitizerType.BODY_KEY));
- interceptorManager.addSanitizers(customSanitizers);
- }
-
- if (interceptorManager.isRecordMode()) {
- policies.add(interceptorManager.getRecordPolicy());
- }
-
- if (interceptorManager.isPlaybackMode()) {
- List customMatchers = new ArrayList<>();
- customMatchers.add(new BodilessMatcher());
- customMatchers.add(new CustomMatcher().setExcludedHeaders(Collections.singletonList("X-MRC-CV")));
- interceptorManager.addMatchers(customMatchers);
- }
-
- HttpPipeline pipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
- .httpClient(interceptorManager.isPlaybackMode() ? interceptorManager.getPlaybackClient() : httpClient)
- .build();
-
- return pipeline;
- }
-
- String getAccountDomain() {
- return interceptorManager.isPlaybackMode() ? this.playbackAccountDomain : this.accountDomain;
- }
-
- String getAccountId() {
- String accountIdValue = interceptorManager.isPlaybackMode() ? this.playbackAccountId : this.accountId;
-
- return accountIdValue;
- }
-
- AzureKeyCredential getAccountKey() {
- String accountKeyValue = interceptorManager.isPlaybackMode() ? this.playbackAccountKey : this.accountKey;
-
- return new AzureKeyCredential(accountKeyValue);
- }
-
- static TokenCredential constructAccountKeyCredential(String accountId, AzureKeyCredential keyCredential) {
- return new MixedRealityAccountKeyCredential(UUID.fromString(accountId), keyCredential);
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTests.java b/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTests.java
deleted file mode 100644
index 68af955a5420..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/src/test/java/com/azure/mixedreality/authentication/MixedRealityStsClientTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.mixedreality.authentication;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class MixedRealityStsClientTests extends MixedRealityStsClientTestBase {
- private static final String DISPLAY_NAME_WITH_ARGUMENTS = "{displayName} with [{arguments}]";
- private MixedRealityStsClient client;
-
- private void initializeClient(HttpClient httpClient) {
- client = new MixedRealityStsClientBuilder().accountId(super.getAccountId())
- .accountDomain(super.getAccountDomain())
- .pipeline(super.getHttpPipeline(httpClient))
- .buildClient();
- }
-
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void getToken(HttpClient httpClient) {
- // arrange
- initializeClient(httpClient);
-
- // act
- AccessToken actual = this.client.getToken();
-
- // assert
- assertNotNull(actual);
- assertNotNull(actual.getToken());
- assertNotNull(actual.getExpiresAt());
- }
-
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void getTokenWithResponse(HttpClient httpClient) {
- // arrange
- initializeClient(httpClient);
-
- // act
- Response actualResponse = this.client.getTokenWithResponse(Context.NONE);
-
- // assert
- assertNotNull(actualResponse);
- assertEquals(200, actualResponse.getStatusCode());
-
- // act
- AccessToken actual = actualResponse.getValue();
-
- // assert
- assertNotNull(actual);
- assertNotNull(actual.getToken());
- assertNotNull(actual.getExpiresAt());
- }
-}
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md b/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md
deleted file mode 100644
index c8bb1e55ffcc..000000000000
--- a/sdk/mixedreality/azure-mixedreality-authentication/swagger/autorest.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Azure Mixed Reality Authentication Service client library for Java
-
-> see https://aka.ms/autorest
-
-This is the Autorest configuration file for Mixed Reality Authentication.
-
----
-## Getting Started
-To build the SDK for Mixed Reality Authentication, simply [Install Autorest](https://aka.ms/autorest) and in this folder, run:
-
-> `autorest`
-
-To see additional help and options, run:
-
-> `autorest --help`
-
-### Setup
-```ps
-npm install -g autorest
-```
-
-### Generation
-
-```ps
-cd
-autorest
-```
-
-## Configuration
-
-```yaml
-use: '@autorest/java@4.1.62'
-output-folder: ../
-java: true
-input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/aa19725fe79aea2a9dc580f3c66f77f89cc34563/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/2019-02-28-preview/mr-sts.json
-title: MixedRealityStsRestClient
-namespace: com.azure.mixedreality.authentication
-models-subpackage: implementation.models
-generate-client-as-impl: true
-license-header: MICROSOFT_MIT_SMALL
-sync-methods: none
-```
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md
deleted file mode 100644
index 8a15f1bf57fd..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md
+++ /dev/null
@@ -1,168 +0,0 @@
-# Release History
-
-## 1.1.0-beta.1 (Unreleased)
-
-### Features Added
-
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
-## 1.0.1 (2026-02-09)
-
-### Other Changes
-
-- Please note, this package has been deprecated and will no longer be maintained after 2025/10/01. There are no replacement packages, as all mixed reality services are deprecated. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.
-
-## 1.0.0 (2024-12-23)
-
-- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
-
-### Other Changes
-
-- Release Azure Resource Manager MixedReality client library for Java.
-
-## 1.0.0-beta.3 (2024-10-17)
-
-- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
-
-### Features Added
-
-#### `models.Identity` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-#### `models.LogSpecification` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-#### `models.OperationProperties` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.MetricSpecification` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.ServiceSpecification` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-#### `models.SpatialAnchorsAccountPage` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-#### `models.AccountKeyRegenerateRequest` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.OperationDisplay` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-#### `models.Sku` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.RemoteRenderingAccountPage` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.CheckNameAvailabilityRequest` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.OperationPage` was modified
-
-* `toJson(com.azure.json.JsonWriter)` was added
-* `fromJson(com.azure.json.JsonReader)` was added
-
-#### `models.MetricDimension` was modified
-
-* `fromJson(com.azure.json.JsonReader)` was added
-* `toJson(com.azure.json.JsonWriter)` was added
-
-## 1.0.0-beta.2 (2023-01-18)
-
-- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
-
-### Breaking Changes
-
-#### `models.RemoteRenderingAccounts` was modified
-
-* `deleteWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
-
-#### `models.SpatialAnchorsAccounts` was modified
-
-* `deleteWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
-
-### Features Added
-
-#### `models.RemoteRenderingAccounts` was modified
-
-* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
-
-#### `models.SpatialAnchorsAccount` was modified
-
-* `resourceGroupName()` was added
-
-#### `models.MetricSpecification` was modified
-
-* `withFillGapWithZero(java.lang.Boolean)` was added
-* `sourceMdmNamespace()` was added
-* `withSupportedAggregationTypes(java.util.List)` was added
-* `metricFilterPattern()` was added
-* `supportedTimeGrainTypes()` was added
-* `withMetricFilterPattern(java.lang.String)` was added
-* `withSourceMdmAccount(java.lang.String)` was added
-* `withCategory(java.lang.String)` was added
-* `withEnableRegionalMdmAccount(java.lang.Boolean)` was added
-* `withSourceMdmNamespace(java.lang.String)` was added
-* `enableRegionalMdmAccount()` was added
-* `sourceMdmAccount()` was added
-* `withLockedAggregationType(java.lang.String)` was added
-* `supportedAggregationTypes()` was added
-* `category()` was added
-* `fillGapWithZero()` was added
-* `withSupportedTimeGrainTypes(java.util.List)` was added
-* `lockedAggregationType()` was added
-
-#### `models.RemoteRenderingAccount` was modified
-
-* `resourceGroupName()` was added
-
-#### `MixedRealityManager$Configurable` was modified
-
-* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added
-* `withScope(java.lang.String)` was added
-
-#### `models.SpatialAnchorsAccounts` was modified
-
-* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
-
-#### `MixedRealityManager` was modified
-
-* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added
-
-#### `models.MetricDimension` was modified
-
-* `toBeExportedForShoebox()` was added
-* `withToBeExportedForShoebox(java.lang.Boolean)` was added
-
-## 1.0.0-beta.1 (2021-04-27)
-
-- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
-
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md
deleted file mode 100644
index 67fc4ebfe599..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md
+++ /dev/null
@@ -1,110 +0,0 @@
-# Azure Resource Manager MixedReality client library for Java
-
-## Disclaimer
-
-Please note, this package has been deprecated and will no longer be maintained after 2025/10/01. There are no replacement packages, as all mixed reality services are deprecated. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.
-
-## Overview
-
-Azure Resource Manager MixedReality client library for Java.
-
-This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-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
-
-We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
-
-If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
-
-Thank you in advance for your collaboration. We really appreciate your time!
-
-## Documentation
-
-Various documentation is available to help you get started
-
-- [API reference documentation][docs]
-
-## Getting started
-
-### Prerequisites
-
-- [Java Development Kit (JDK)][jdk] with version 8 or above
-- [Azure Subscription][azure_subscription]
-
-### Adding the package to your product
-
-[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-mixedreality;current})
-```xml
-
- com.azure.resourcemanager
- azure-resourcemanager-mixedreality
- 1.1.0-beta.1
-
-```
-[//]: # ({x-version-update-end})
-
-### Include the recommended packages
-
-Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-
-[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
-
-### Authentication
-
-Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-
-Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
-
-```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
-TokenCredential credential = new DefaultAzureCredentialBuilder()
- .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
- .build();
-MixedRealityManager manager = MixedRealityManager
- .authenticate(credential, profile);
-```
-
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
-
-See [Authentication][authenticate] for more options.
-
-## Key concepts
-
-See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
-
-## Examples
-
-[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md)
-
-
-## Troubleshooting
-
-## Next steps
-
-## Contributing
-
-For details on contributing to this repository, see the [contributing guide][cg].
-
-This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
-
-When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
-
-This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
-
-
-[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
-[docs]: https://azure.github.io/azure-sdk-for-java/
-[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
-[azure_subscription]: https://azure.microsoft.com/free/
-[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
-[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
-[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
-[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
-[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
-[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
-[coc]: https://opensource.microsoft.com/codeofconduct/
-[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md
deleted file mode 100644
index e74deb58cea9..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md
+++ /dev/null
@@ -1,533 +0,0 @@
-# Code snippets and samples
-
-
-## Operations
-
-- [List](#operations_list)
-
-## RemoteRenderingAccounts
-
-- [Create](#remoterenderingaccounts_create)
-- [Delete](#remoterenderingaccounts_delete)
-- [GetByResourceGroup](#remoterenderingaccounts_getbyresourcegroup)
-- [List](#remoterenderingaccounts_list)
-- [ListByResourceGroup](#remoterenderingaccounts_listbyresourcegroup)
-- [ListKeys](#remoterenderingaccounts_listkeys)
-- [RegenerateKeys](#remoterenderingaccounts_regeneratekeys)
-- [Update](#remoterenderingaccounts_update)
-
-## ResourceProvider
-
-- [CheckNameAvailabilityLocal](#resourceprovider_checknameavailabilitylocal)
-
-## SpatialAnchorsAccounts
-
-- [Create](#spatialanchorsaccounts_create)
-- [Delete](#spatialanchorsaccounts_delete)
-- [GetByResourceGroup](#spatialanchorsaccounts_getbyresourcegroup)
-- [List](#spatialanchorsaccounts_list)
-- [ListByResourceGroup](#spatialanchorsaccounts_listbyresourcegroup)
-- [ListKeys](#spatialanchorsaccounts_listkeys)
-- [RegenerateKeys](#spatialanchorsaccounts_regeneratekeys)
-- [Update](#spatialanchorsaccounts_update)
-### Operations_List
-
-```java
-/**
- * Samples for Operations List.
- */
-public final class OperationsListSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/
- * ExposingAvailableOperations.json
- */
- /**
- * Sample code: List available operations.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void listAvailableOperations(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.operations().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_Create
-
-```java
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
-
-/**
- * Samples for RemoteRenderingAccounts Create.
- */
-public final class RemoteRenderingAccountsCreateSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * Put.json
- */
- /**
- * Sample code: Create remote rendering account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- createRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts()
- .define("MyAccount")
- .withRegion("eastus2euap")
- .withExistingResourceGroup("MyResourceGroup")
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .create();
- }
-}
-```
-
-### RemoteRenderingAccounts_Delete
-
-```java
-/**
- * Samples for RemoteRenderingAccounts Delete.
- */
-public final class RemoteRenderingAccountsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * Delete.json
- */
- /**
- * Sample code: Delete remote rendering account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- deleteRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts()
- .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_GetByResourceGroup
-
-```java
-/**
- * Samples for RemoteRenderingAccounts GetByResourceGroup.
- */
-public final class RemoteRenderingAccountsGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * Get.json
- */
- /**
- * Sample code: Get remote rendering account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts()
- .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_List
-
-```java
-/**
- * Samples for RemoteRenderingAccounts List.
- */
-public final class RemoteRenderingAccountsListSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * GetBySubscription.json
- */
- /**
- * Sample code: List remote rendering accounts by subscription.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- listRemoteRenderingAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_ListByResourceGroup
-
-```java
-/**
- * Samples for RemoteRenderingAccounts ListByResourceGroup.
- */
-public final class RemoteRenderingAccountsListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * GetByResourceGroup.json
- */
- /**
- * Sample code: List remote rendering accounts by resource group.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- listRemoteRenderingAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_ListKeys
-
-```java
-/**
- * Samples for RemoteRenderingAccounts ListKeys.
- */
-public final class RemoteRenderingAccountsListKeysSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * ListKeys.json
- */
- /**
- * Sample code: List remote rendering account key.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- listRemoteRenderingAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts()
- .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_RegenerateKeys
-
-```java
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.Serial;
-
-/**
- * Samples for RemoteRenderingAccounts RegenerateKeys.
- */
-public final class RemoteRenderingAccountsRegenerateKeysSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * RegenerateKey.json
- */
- /**
- * Sample code: Regenerate remote rendering account keys.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- regenerateRemoteRenderingAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.remoteRenderingAccounts()
- .regenerateKeysWithResponse("MyResourceGroup", "MyAccount",
- new AccountKeyRegenerateRequest().withSerial(Serial.ONE), com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### RemoteRenderingAccounts_Update
-
-```java
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
-import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for RemoteRenderingAccounts Update.
- */
-public final class RemoteRenderingAccountsUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/
- * Patch.json
- */
- /**
- * Sample code: Update remote rendering account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- updateRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- RemoteRenderingAccount resource = manager.remoteRenderingAccounts()
- .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withTags(mapOf("hero", "romeo", "heroine", "juliet"))
- .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
- .apply();
- }
-
- // Use "Map.of" if available
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
-```
-
-### ResourceProvider_CheckNameAvailabilityLocal
-
-```java
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
-
-/**
- * Samples for ResourceProvider CheckNameAvailabilityLocal.
- */
-public final class ResourceProviderCheckNameAvailabilityLocalSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/
- * CheckNameAvailabilityForLocalUniqueness.json
- */
- /**
- * Sample code: CheckLocalNameAvailability.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void checkLocalNameAvailability(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.resourceProviders()
- .checkNameAvailabilityLocalWithResponse("eastus2euap",
- new CheckNameAvailabilityRequest().withName("MyAccount")
- .withType("Microsoft.MixedReality/spatialAnchorsAccounts"),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_Create
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts Create.
- */
-public final class SpatialAnchorsAccountsCreateSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Put
- * .json
- */
- /**
- * Sample code: Create spatial anchor account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts()
- .define("MyAccount")
- .withRegion("eastus2euap")
- .withExistingResourceGroup("MyResourceGroup")
- .create();
- }
-}
-```
-
-### SpatialAnchorsAccounts_Delete
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts Delete.
- */
-public final class SpatialAnchorsAccountsDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * Delete.json
- */
- /**
- * Sample code: Delete spatial anchors account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts()
- .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_GetByResourceGroup
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts GetByResourceGroup.
- */
-public final class SpatialAnchorsAccountsGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Get
- * .json
- */
- /**
- * Sample code: Get spatial anchors account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts()
- .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_List
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts List.
- */
-public final class SpatialAnchorsAccountsListSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * GetBySubscription.json
- */
- /**
- * Sample code: List spatial anchors accounts by subscription.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- listSpatialAnchorsAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_ListByResourceGroup
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts ListByResourceGroup.
- */
-public final class SpatialAnchorsAccountsListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * GetByResourceGroup.json
- */
- /**
- * Sample code: List spatial anchor accounts by resource group.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- listSpatialAnchorAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_ListKeys
-
-```java
-/**
- * Samples for SpatialAnchorsAccounts ListKeys.
- */
-public final class SpatialAnchorsAccountsListKeysSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * ListKeys.json
- */
- /**
- * Sample code: List spatial anchor account key.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts()
- .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_RegenerateKeys
-
-```java
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.Serial;
-
-/**
- * Samples for SpatialAnchorsAccounts RegenerateKeys.
- */
-public final class SpatialAnchorsAccountsRegenerateKeysSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * RegenerateKey.json
- */
- /**
- * Sample code: Regenerate spatial anchors account keys.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void
- regenerateSpatialAnchorsAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- manager.spatialAnchorsAccounts()
- .regenerateKeysWithResponse("MyResourceGroup", "MyAccount",
- new AccountKeyRegenerateRequest().withSerial(Serial.ONE), com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### SpatialAnchorsAccounts_Update
-
-```java
-import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for SpatialAnchorsAccounts Update.
- */
-public final class SpatialAnchorsAccountsUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/
- * Patch.json
- */
- /**
- * Sample code: Update spatial anchors account.
- *
- * @param manager Entry point to MixedRealityManager.
- */
- public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
- SpatialAnchorsAccount resource = manager.spatialAnchorsAccounts()
- .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE)
- .getValue();
- resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).apply();
- }
-
- // Use "Map.of" if available
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
-```
-
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml
deleted file mode 100644
index 6ea07003005c..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
-
- com.azure.resourcemanager
- azure-resourcemanager-mixedreality
- 1.1.0-beta.1
- jar
-
- Microsoft Azure SDK for MixedReality Management
- Please note, this package has been deprecated and will no longer be maintained after 2025/10/01. There are no replacement packages, as all mixed reality services are deprecated. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-01.
- https://github.com/Azure/azure-sdk-for-java
-
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
-
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- 0
- 0
- false
-
-
-
- com.azure
- azure-core
- 1.57.1
-
-
- com.azure
- azure-core-management
- 1.19.3
-
-
- com.azure
- azure-core-test
- 1.27.0-beta.14
- test
-
-
- com.azure
- azure-identity
- 1.18.2
- test
-
-
-
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java
deleted file mode 100644
index c98dfda9d20c..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java
+++ /dev/null
@@ -1,325 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality;
-
-import com.azure.core.credential.TokenCredential;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-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.BearerTokenAuthenticationPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
-import com.azure.core.http.policy.HttpLoggingPolicy;
-import com.azure.core.http.policy.HttpPipelinePolicy;
-import com.azure.core.http.policy.HttpPolicyProviders;
-import com.azure.core.http.policy.RequestIdPolicy;
-import com.azure.core.http.policy.RetryOptions;
-import com.azure.core.http.policy.RetryPolicy;
-import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.core.util.Configuration;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient;
-import com.azure.resourcemanager.mixedreality.implementation.MixedRealityClientBuilder;
-import com.azure.resourcemanager.mixedreality.implementation.OperationsImpl;
-import com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountsImpl;
-import com.azure.resourcemanager.mixedreality.implementation.ResourceProvidersImpl;
-import com.azure.resourcemanager.mixedreality.implementation.SpatialAnchorsAccountsImpl;
-import com.azure.resourcemanager.mixedreality.models.Operations;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccounts;
-import com.azure.resourcemanager.mixedreality.models.ResourceProviders;
-import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccounts;
-import java.time.Duration;
-import java.time.temporal.ChronoUnit;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-/**
- * Entry point to MixedRealityManager.
- * Mixed Reality Client.
- */
-public final class MixedRealityManager {
- private Operations operations;
-
- private ResourceProviders resourceProviders;
-
- private SpatialAnchorsAccounts spatialAnchorsAccounts;
-
- private RemoteRenderingAccounts remoteRenderingAccounts;
-
- private final MixedRealityClient clientObject;
-
- private MixedRealityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
- Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
- Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new MixedRealityClientBuilder().pipeline(httpPipeline)
- .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
- .subscriptionId(profile.getSubscriptionId())
- .defaultPollInterval(defaultPollInterval)
- .buildClient();
- }
-
- /**
- * Creates an instance of MixedReality service API entry point.
- *
- * @param credential the credential to use.
- * @param profile the Azure profile for client.
- * @return the MixedReality service API instance.
- */
- public static MixedRealityManager authenticate(TokenCredential credential, AzureProfile profile) {
- Objects.requireNonNull(credential, "'credential' cannot be null.");
- Objects.requireNonNull(profile, "'profile' cannot be null.");
- return configure().authenticate(credential, profile);
- }
-
- /**
- * Creates an instance of MixedReality service API entry point.
- *
- * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
- * @param profile the Azure profile for client.
- * @return the MixedReality service API instance.
- */
- public static MixedRealityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
- Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
- Objects.requireNonNull(profile, "'profile' cannot be null.");
- return new MixedRealityManager(httpPipeline, profile, null);
- }
-
- /**
- * Gets a Configurable instance that can be used to create MixedRealityManager with optional configuration.
- *
- * @return the Configurable instance allowing configurations.
- */
- public static Configurable configure() {
- return new MixedRealityManager.Configurable();
- }
-
- /**
- * The Configurable allowing configurations to be set.
- */
- public static final class Configurable {
- private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
-
- private HttpClient httpClient;
- private HttpLogOptions httpLogOptions;
- private final List policies = new ArrayList<>();
- private final List scopes = new ArrayList<>();
- private RetryPolicy retryPolicy;
- private RetryOptions retryOptions;
- private Duration defaultPollInterval;
-
- private Configurable() {
- }
-
- /**
- * Sets the http client.
- *
- * @param httpClient the HTTP client.
- * @return the configurable object itself.
- */
- public Configurable withHttpClient(HttpClient httpClient) {
- this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
- return this;
- }
-
- /**
- * Sets the logging options to the HTTP pipeline.
- *
- * @param httpLogOptions the HTTP log options.
- * @return the configurable object itself.
- */
- public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
- this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
- return this;
- }
-
- /**
- * Adds the pipeline policy to the HTTP pipeline.
- *
- * @param policy the HTTP pipeline policy.
- * @return the configurable object itself.
- */
- public Configurable withPolicy(HttpPipelinePolicy policy) {
- this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
- return this;
- }
-
- /**
- * Adds the scope to permission sets.
- *
- * @param scope the scope.
- * @return the configurable object itself.
- */
- public Configurable withScope(String scope) {
- this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
- return this;
- }
-
- /**
- * Sets the retry policy to the HTTP pipeline.
- *
- * @param retryPolicy the HTTP pipeline retry policy.
- * @return the configurable object itself.
- */
- public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
- this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
- return this;
- }
-
- /**
- * Sets the retry options for the HTTP pipeline retry policy.
- *
- * 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.
- */
- public Configurable withRetryOptions(RetryOptions retryOptions) {
- this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
- return this;
- }
-
- /**
- * Sets the default poll interval, used when service does not provide "Retry-After" header.
- *
- * @param defaultPollInterval the default poll interval.
- * @return the configurable object itself.
- */
- public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval
- = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
- if (this.defaultPollInterval.isNegative()) {
- throw LOGGER
- .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
- }
- return this;
- }
-
- /**
- * Creates an instance of MixedReality service API entry point.
- *
- * @param credential the credential to use.
- * @param profile the Azure profile for client.
- * @return the MixedReality service API instance.
- */
- public MixedRealityManager authenticate(TokenCredential credential, AzureProfile profile) {
- Objects.requireNonNull(credential, "'credential' cannot be null.");
- Objects.requireNonNull(profile, "'profile' cannot be null.");
-
- StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder.append("azsdk-java")
- .append("-")
- .append("com.azure.resourcemanager.mixedreality")
- .append("/")
- .append("1.0.0");
- if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
- userAgentBuilder.append(" (")
- .append(Configuration.getGlobalConfiguration().get("java.version"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.name"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.version"))
- .append("; auto-generated)");
- } else {
- userAgentBuilder.append(" (auto-generated)");
- }
-
- if (scopes.isEmpty()) {
- scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
- }
- if (retryPolicy == null) {
- if (retryOptions != null) {
- retryPolicy = new RetryPolicy(retryOptions);
- } else {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
- }
- }
- List policies = new ArrayList<>();
- 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()));
- HttpPolicyProviders.addBeforeRetryPolicies(policies);
- policies.add(retryPolicy);
- policies.add(new AddDatePolicy());
- policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- 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();
- return new MixedRealityManager(httpPipeline, profile, defaultPollInterval);
- }
- }
-
- /**
- * Gets the resource collection API of Operations.
- *
- * @return Resource collection API of Operations.
- */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
- /**
- * Gets the resource collection API of ResourceProviders.
- *
- * @return Resource collection API of ResourceProviders.
- */
- public ResourceProviders resourceProviders() {
- if (this.resourceProviders == null) {
- this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
- }
- return resourceProviders;
- }
-
- /**
- * Gets the resource collection API of SpatialAnchorsAccounts. It manages SpatialAnchorsAccount.
- *
- * @return Resource collection API of SpatialAnchorsAccounts.
- */
- public SpatialAnchorsAccounts spatialAnchorsAccounts() {
- if (this.spatialAnchorsAccounts == null) {
- this.spatialAnchorsAccounts
- = new SpatialAnchorsAccountsImpl(clientObject.getSpatialAnchorsAccounts(), this);
- }
- return spatialAnchorsAccounts;
- }
-
- /**
- * Gets the resource collection API of RemoteRenderingAccounts. It manages RemoteRenderingAccount.
- *
- * @return Resource collection API of RemoteRenderingAccounts.
- */
- public RemoteRenderingAccounts remoteRenderingAccounts() {
- if (this.remoteRenderingAccounts == null) {
- this.remoteRenderingAccounts
- = new RemoteRenderingAccountsImpl(clientObject.getRemoteRenderingAccounts(), this);
- }
- return remoteRenderingAccounts;
- }
-
- /**
- * Gets wrapped service client MixedRealityClient providing direct access to the underlying auto-generated API
- * implementation, based on Azure REST API.
- *
- * @return Wrapped service client MixedRealityClient.
- */
- public MixedRealityClient serviceClient() {
- return this.clientObject;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java
deleted file mode 100644
index b16d3ae45b2d..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent;
-
-import com.azure.core.http.HttpPipeline;
-import java.time.Duration;
-
-/**
- * The interface for MixedRealityClient class.
- */
-public interface MixedRealityClient {
- /**
- * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
- *
- * @return the endpoint value.
- */
- String getEndpoint();
-
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- String getApiVersion();
-
- /**
- * Gets The HTTP pipeline to send requests through.
- *
- * @return the httpPipeline value.
- */
- HttpPipeline getHttpPipeline();
-
- /**
- * Gets The default poll interval for long-running operation.
- *
- * @return the defaultPollInterval value.
- */
- Duration getDefaultPollInterval();
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- OperationsClient getOperations();
-
- /**
- * Gets the ResourceProvidersClient object to access its operations.
- *
- * @return the ResourceProvidersClient object.
- */
- ResourceProvidersClient getResourceProviders();
-
- /**
- * Gets the SpatialAnchorsAccountsClient object to access its operations.
- *
- * @return the SpatialAnchorsAccountsClient object.
- */
- SpatialAnchorsAccountsClient getSpatialAnchorsAccounts();
-
- /**
- * Gets the RemoteRenderingAccountsClient object to access its operations.
- *
- * @return the RemoteRenderingAccountsClient object.
- */
- RemoteRenderingAccountsClient getRemoteRenderingAccounts();
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java
deleted file mode 100644
index 1c71fb0186d5..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner;
-
-/**
- * An instance of this class provides access to all the operations defined in OperationsClient.
- */
-public interface OperationsClient {
- /**
- * Exposing Available Operations.
- *
- * @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 Resource Provider operations as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * Exposing Available Operations.
- *
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Resource Provider operations as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java
deleted file mode 100644
index 56cc4e551d50..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-
-/**
- * An instance of this class provides access to all the operations defined in RemoteRenderingAccountsClient.
- */
-public interface RemoteRenderingAccountsClient {
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String accountName);
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
- Context context);
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RemoteRenderingAccountInner getByResourceGroup(String resourceGroupName, String accountName);
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount, Context context);
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RemoteRenderingAccountInner update(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount);
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount, Context context);
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- RemoteRenderingAccountInner create(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount);
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listKeysWithResponse(String resourceGroupName, String accountName, Context context);
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- AccountKeysInner listKeys(String resourceGroupName, String accountName);
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response regenerateKeysWithResponse(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate, Context context);
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- AccountKeysInner regenerateKeys(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate);
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java
deleted file mode 100644
index 65b0c80d878f..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
-
-/**
- * An instance of this class provides access to all the operations defined in ResourceProvidersClient.
- */
-public interface ResourceProvidersClient {
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response checkNameAvailabilityLocalWithResponse(String location,
- CheckNameAvailabilityRequest checkNameAvailability, Context context);
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 check Name Availability Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CheckNameAvailabilityResponseInner checkNameAvailabilityLocal(String location,
- CheckNameAvailabilityRequest checkNameAvailability);
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java
deleted file mode 100644
index 72c24ede38ae..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-
-/**
- * An instance of this class provides access to all the operations defined in SpatialAnchorsAccountsClient.
- */
-public interface SpatialAnchorsAccountsClient {
- /**
- * List Spatial Anchors Accounts by Subscription.
- *
- * @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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * List Spatial Anchors Accounts by Subscription.
- *
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
-
- /**
- * Delete a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
-
- /**
- * Delete a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String accountName);
-
- /**
- * Retrieve a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return spatialAnchorsAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
- Context context);
-
- /**
- * Retrieve a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 spatialAnchorsAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SpatialAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName);
-
- /**
- * Updating a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param spatialAnchorsAccount Spatial Anchors Account parameter.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return spatialAnchorsAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(String resourceGroupName, String accountName,
- SpatialAnchorsAccountInner spatialAnchorsAccount, Context context);
-
- /**
- * Updating a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param spatialAnchorsAccount Spatial Anchors Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 spatialAnchorsAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SpatialAnchorsAccountInner update(String resourceGroupName, String accountName,
- SpatialAnchorsAccountInner spatialAnchorsAccount);
-
- /**
- * Creating or Updating a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param spatialAnchorsAccount Spatial Anchors Account parameter.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return spatialAnchorsAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(String resourceGroupName, String accountName,
- SpatialAnchorsAccountInner spatialAnchorsAccount, Context context);
-
- /**
- * Creating or Updating a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param spatialAnchorsAccount Spatial Anchors Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 spatialAnchorsAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SpatialAnchorsAccountInner create(String resourceGroupName, String accountName,
- SpatialAnchorsAccountInner spatialAnchorsAccount);
-
- /**
- * List Both of the 2 Keys of a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listKeysWithResponse(String resourceGroupName, String accountName, Context context);
-
- /**
- * List Both of the 2 Keys of a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- AccountKeysInner listKeys(String resourceGroupName, String accountName);
-
- /**
- * Regenerate specified Key of a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response regenerateKeysWithResponse(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate, Context context);
-
- /**
- * Regenerate specified Key of a Spatial Anchors Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- AccountKeysInner regenerateKeys(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate);
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java
deleted file mode 100644
index 2dc1ce132287..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * Developer Keys of account.
- */
-@Immutable
-public final class AccountKeysInner implements JsonSerializable {
- /*
- * value of primary key.
- */
- private String primaryKey;
-
- /*
- * value of secondary key.
- */
- private String secondaryKey;
-
- /**
- * Creates an instance of AccountKeysInner class.
- */
- public AccountKeysInner() {
- }
-
- /**
- * Get the primaryKey property: value of primary key.
- *
- * @return the primaryKey value.
- */
- public String primaryKey() {
- return this.primaryKey;
- }
-
- /**
- * Get the secondaryKey property: value of secondary key.
- *
- * @return the secondaryKey value.
- */
- public String secondaryKey() {
- return this.secondaryKey;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of AccountKeysInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of AccountKeysInner if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IOException If an error occurs while reading the AccountKeysInner.
- */
- public static AccountKeysInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- AccountKeysInner deserializedAccountKeysInner = new AccountKeysInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("primaryKey".equals(fieldName)) {
- deserializedAccountKeysInner.primaryKey = reader.getString();
- } else if ("secondaryKey".equals(fieldName)) {
- deserializedAccountKeysInner.secondaryKey = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedAccountKeysInner;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java
deleted file mode 100644
index d5e67a1ea204..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.mixedreality.models.NameUnavailableReason;
-import java.io.IOException;
-
-/**
- * Check Name Availability Response.
- */
-@Fluent
-public final class CheckNameAvailabilityResponseInner implements JsonSerializable {
- /*
- * if name Available
- */
- private boolean nameAvailable;
-
- /*
- * Resource Name To Verify
- */
- private NameUnavailableReason reason;
-
- /*
- * detail message
- */
- private String message;
-
- /**
- * Creates an instance of CheckNameAvailabilityResponseInner class.
- */
- public CheckNameAvailabilityResponseInner() {
- }
-
- /**
- * Get the nameAvailable property: if name Available.
- *
- * @return the nameAvailable value.
- */
- public boolean nameAvailable() {
- return this.nameAvailable;
- }
-
- /**
- * Set the nameAvailable property: if name Available.
- *
- * @param nameAvailable the nameAvailable value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withNameAvailable(boolean nameAvailable) {
- this.nameAvailable = nameAvailable;
- return this;
- }
-
- /**
- * Get the reason property: Resource Name To Verify.
- *
- * @return the reason value.
- */
- public NameUnavailableReason reason() {
- return this.reason;
- }
-
- /**
- * Set the reason property: Resource Name To Verify.
- *
- * @param reason the reason value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withReason(NameUnavailableReason reason) {
- this.reason = reason;
- return this;
- }
-
- /**
- * Get the message property: detail message.
- *
- * @return the message value.
- */
- public String message() {
- return this.message;
- }
-
- /**
- * Set the message property: detail message.
- *
- * @param message the message value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withMessage(String message) {
- this.message = message;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable);
- jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString());
- jsonWriter.writeStringField("message", this.message);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of CheckNameAvailabilityResponseInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of CheckNameAvailabilityResponseInner if the JsonReader was pointing to an instance of it, or
- * null if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the CheckNameAvailabilityResponseInner.
- */
- public static CheckNameAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- CheckNameAvailabilityResponseInner deserializedCheckNameAvailabilityResponseInner
- = new CheckNameAvailabilityResponseInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("nameAvailable".equals(fieldName)) {
- deserializedCheckNameAvailabilityResponseInner.nameAvailable = reader.getBoolean();
- } else if ("reason".equals(fieldName)) {
- deserializedCheckNameAvailabilityResponseInner.reason
- = NameUnavailableReason.fromString(reader.getString());
- } else if ("message".equals(fieldName)) {
- deserializedCheckNameAvailabilityResponseInner.message = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedCheckNameAvailabilityResponseInner;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java
deleted file mode 100644
index 15695c84d74d..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * Common Properties shared by Mixed Reality Accounts.
- */
-@Fluent
-public final class MixedRealityAccountProperties implements JsonSerializable {
- /*
- * The name of the storage account associated with this accountId
- */
- private String storageAccountName;
-
- /*
- * unique id of certain account.
- */
- private String accountId;
-
- /*
- * Correspond domain name of certain Spatial Anchors Account
- */
- private String accountDomain;
-
- /**
- * Creates an instance of MixedRealityAccountProperties class.
- */
- public MixedRealityAccountProperties() {
- }
-
- /**
- * Get the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @return the storageAccountName value.
- */
- public String storageAccountName() {
- return this.storageAccountName;
- }
-
- /**
- * Set the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @param storageAccountName the storageAccountName value to set.
- * @return the MixedRealityAccountProperties object itself.
- */
- public MixedRealityAccountProperties withStorageAccountName(String storageAccountName) {
- this.storageAccountName = storageAccountName;
- return this;
- }
-
- /**
- * Get the accountId property: unique id of certain account.
- *
- * @return the accountId value.
- */
- public String accountId() {
- return this.accountId;
- }
-
- /**
- * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
- *
- * @return the accountDomain value.
- */
- public String accountDomain() {
- return this.accountDomain;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("storageAccountName", this.storageAccountName);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of MixedRealityAccountProperties from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of MixedRealityAccountProperties if the JsonReader was pointing to an instance of it, or null
- * if it was pointing to JSON null.
- * @throws IOException If an error occurs while reading the MixedRealityAccountProperties.
- */
- public static MixedRealityAccountProperties fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- MixedRealityAccountProperties deserializedMixedRealityAccountProperties
- = new MixedRealityAccountProperties();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("storageAccountName".equals(fieldName)) {
- deserializedMixedRealityAccountProperties.storageAccountName = reader.getString();
- } else if ("accountId".equals(fieldName)) {
- deserializedMixedRealityAccountProperties.accountId = reader.getString();
- } else if ("accountDomain".equals(fieldName)) {
- deserializedMixedRealityAccountProperties.accountDomain = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedMixedRealityAccountProperties;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java
deleted file mode 100644
index ff120f0e9f8d..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java
+++ /dev/null
@@ -1,213 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.mixedreality.models.OperationDisplay;
-import com.azure.resourcemanager.mixedreality.models.OperationProperties;
-import java.io.IOException;
-
-/**
- * REST API operation.
- */
-@Fluent
-public final class OperationInner implements JsonSerializable {
- /*
- * Operation name: {provider}/{resource}/{operation}
- */
- private String name;
-
- /*
- * The object that represents the operation.
- */
- private OperationDisplay display;
-
- /*
- * Whether or not this is a data plane operation
- */
- private Boolean isDataAction;
-
- /*
- * The origin
- */
- private String origin;
-
- /*
- * Properties of the operation
- */
- private OperationProperties properties;
-
- /**
- * Creates an instance of OperationInner class.
- */
- public OperationInner() {
- }
-
- /**
- * Get the name property: Operation name: {provider}/{resource}/{operation}.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: Operation name: {provider}/{resource}/{operation}.
- *
- * @param name the name value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the display property: The object that represents the operation.
- *
- * @return the display value.
- */
- public OperationDisplay display() {
- return this.display;
- }
-
- /**
- * Set the display property: The object that represents the operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Get the isDataAction property: Whether or not this is a data plane operation.
- *
- * @return the isDataAction value.
- */
- public Boolean isDataAction() {
- return this.isDataAction;
- }
-
- /**
- * Set the isDataAction property: Whether or not this is a data plane operation.
- *
- * @param isDataAction the isDataAction value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withIsDataAction(Boolean isDataAction) {
- this.isDataAction = isDataAction;
- return this;
- }
-
- /**
- * Get the origin property: The origin.
- *
- * @return the origin value.
- */
- public String origin() {
- return this.origin;
- }
-
- /**
- * Set the origin property: The origin.
- *
- * @param origin the origin value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withOrigin(String origin) {
- this.origin = origin;
- return this;
- }
-
- /**
- * Get the properties property: Properties of the operation.
- *
- * @return the properties value.
- */
- public OperationProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Properties of the operation.
- *
- * @param properties the properties value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withProperties(OperationProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- if (properties() != null) {
- properties().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("name", this.name);
- jsonWriter.writeJsonField("display", this.display);
- jsonWriter.writeBooleanField("isDataAction", this.isDataAction);
- jsonWriter.writeStringField("origin", this.origin);
- jsonWriter.writeJsonField("properties", this.properties);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of OperationInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IOException If an error occurs while reading the OperationInner.
- */
- public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- OperationInner deserializedOperationInner = new OperationInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("name".equals(fieldName)) {
- deserializedOperationInner.name = reader.getString();
- } else if ("display".equals(fieldName)) {
- deserializedOperationInner.display = OperationDisplay.fromJson(reader);
- } else if ("isDataAction".equals(fieldName)) {
- deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
- } else if ("origin".equals(fieldName)) {
- deserializedOperationInner.origin = reader.getString();
- } else if ("properties".equals(fieldName)) {
- deserializedOperationInner.properties = OperationProperties.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedOperationInner;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java
deleted file mode 100644
index 753dacb0b582..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.management.SystemData;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.Sku;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * RemoteRenderingAccount Response.
- */
-@Fluent
-public final class RemoteRenderingAccountInner extends Resource {
- /*
- * Property bag.
- */
- private MixedRealityAccountProperties innerProperties;
-
- /*
- * The identity associated with this account
- */
- private Identity identity;
-
- /*
- * The plan associated with this account
- */
- private Identity plan;
-
- /*
- * The sku associated with this account
- */
- private Sku sku;
-
- /*
- * The kind of account, if supported
- */
- private Sku kind;
-
- /*
- * System metadata for this account
- */
- private SystemData systemData;
-
- /*
- * The type of the resource.
- */
- private String type;
-
- /*
- * The name of the resource.
- */
- private String name;
-
- /*
- * Fully qualified resource Id for the resource.
- */
- private String id;
-
- /**
- * Creates an instance of RemoteRenderingAccountInner class.
- */
- public RemoteRenderingAccountInner() {
- }
-
- /**
- * Get the innerProperties property: Property bag.
- *
- * @return the innerProperties value.
- */
- private MixedRealityAccountProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the identity property: The identity associated with this account.
- *
- * @return the identity value.
- */
- public Identity identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: The identity associated with this account.
- *
- * @param identity the identity value to set.
- * @return the RemoteRenderingAccountInner object itself.
- */
- public RemoteRenderingAccountInner withIdentity(Identity identity) {
- this.identity = identity;
- return this;
- }
-
- /**
- * Get the plan property: The plan associated with this account.
- *
- * @return the plan value.
- */
- public Identity plan() {
- return this.plan;
- }
-
- /**
- * Set the plan property: The plan associated with this account.
- *
- * @param plan the plan value to set.
- * @return the RemoteRenderingAccountInner object itself.
- */
- public RemoteRenderingAccountInner withPlan(Identity plan) {
- this.plan = plan;
- return this;
- }
-
- /**
- * Get the sku property: The sku associated with this account.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku associated with this account.
- *
- * @param sku the sku value to set.
- * @return the RemoteRenderingAccountInner object itself.
- */
- public RemoteRenderingAccountInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /**
- * Get the kind property: The kind of account, if supported.
- *
- * @return the kind value.
- */
- public Sku kind() {
- return this.kind;
- }
-
- /**
- * Set the kind property: The kind of account, if supported.
- *
- * @param kind the kind value to set.
- * @return the RemoteRenderingAccountInner object itself.
- */
- public RemoteRenderingAccountInner withKind(Sku kind) {
- this.kind = kind;
- return this;
- }
-
- /**
- * Get the systemData property: System metadata for this account.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the type property: The type of the resource.
- *
- * @return the type value.
- */
- @Override
- public String type() {
- return this.type;
- }
-
- /**
- * Get the name property: The name of the resource.
- *
- * @return the name value.
- */
- @Override
- public String name() {
- return this.name;
- }
-
- /**
- * Get the id property: Fully qualified resource Id for the resource.
- *
- * @return the id value.
- */
- @Override
- public String id() {
- return this.id;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public RemoteRenderingAccountInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public RemoteRenderingAccountInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @return the storageAccountName value.
- */
- public String storageAccountName() {
- return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
- }
-
- /**
- * Set the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @param storageAccountName the storageAccountName value to set.
- * @return the RemoteRenderingAccountInner object itself.
- */
- public RemoteRenderingAccountInner withStorageAccountName(String storageAccountName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MixedRealityAccountProperties();
- }
- this.innerProperties().withStorageAccountName(storageAccountName);
- return this;
- }
-
- /**
- * Get the accountId property: unique id of certain account.
- *
- * @return the accountId value.
- */
- public String accountId() {
- return this.innerProperties() == null ? null : this.innerProperties().accountId();
- }
-
- /**
- * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
- *
- * @return the accountDomain value.
- */
- public String accountDomain() {
- return this.innerProperties() == null ? null : this.innerProperties().accountDomain();
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (identity() != null) {
- identity().validate();
- }
- if (plan() != null) {
- plan().validate();
- }
- if (sku() != null) {
- sku().validate();
- }
- if (kind() != null) {
- kind().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("properties", this.innerProperties);
- jsonWriter.writeJsonField("identity", this.identity);
- jsonWriter.writeJsonField("plan", this.plan);
- jsonWriter.writeJsonField("sku", this.sku);
- jsonWriter.writeJsonField("kind", this.kind);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of RemoteRenderingAccountInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of RemoteRenderingAccountInner if the JsonReader was pointing to an instance of it, or null
- * if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the RemoteRenderingAccountInner.
- */
- public static RemoteRenderingAccountInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- RemoteRenderingAccountInner deserializedRemoteRenderingAccountInner = new RemoteRenderingAccountInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.name = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedRemoteRenderingAccountInner.withTags(tags);
- } else if ("properties".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.innerProperties
- = MixedRealityAccountProperties.fromJson(reader);
- } else if ("identity".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.identity = Identity.fromJson(reader);
- } else if ("plan".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.plan = Identity.fromJson(reader);
- } else if ("sku".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.sku = Sku.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.kind = Sku.fromJson(reader);
- } else if ("systemData".equals(fieldName)) {
- deserializedRemoteRenderingAccountInner.systemData = SystemData.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedRemoteRenderingAccountInner;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java
deleted file mode 100644
index 0fbed1a0459a..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.management.SystemData;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.Sku;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * SpatialAnchorsAccount Response.
- */
-@Fluent
-public final class SpatialAnchorsAccountInner extends Resource {
- /*
- * Property bag.
- */
- private MixedRealityAccountProperties innerProperties;
-
- /*
- * The identity associated with this account
- */
- private Identity identity;
-
- /*
- * The plan associated with this account
- */
- private Identity plan;
-
- /*
- * The sku associated with this account
- */
- private Sku sku;
-
- /*
- * The kind of account, if supported
- */
- private Sku kind;
-
- /*
- * System metadata for this account
- */
- private SystemData systemData;
-
- /*
- * The type of the resource.
- */
- private String type;
-
- /*
- * The name of the resource.
- */
- private String name;
-
- /*
- * Fully qualified resource Id for the resource.
- */
- private String id;
-
- /**
- * Creates an instance of SpatialAnchorsAccountInner class.
- */
- public SpatialAnchorsAccountInner() {
- }
-
- /**
- * Get the innerProperties property: Property bag.
- *
- * @return the innerProperties value.
- */
- private MixedRealityAccountProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the identity property: The identity associated with this account.
- *
- * @return the identity value.
- */
- public Identity identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: The identity associated with this account.
- *
- * @param identity the identity value to set.
- * @return the SpatialAnchorsAccountInner object itself.
- */
- public SpatialAnchorsAccountInner withIdentity(Identity identity) {
- this.identity = identity;
- return this;
- }
-
- /**
- * Get the plan property: The plan associated with this account.
- *
- * @return the plan value.
- */
- public Identity plan() {
- return this.plan;
- }
-
- /**
- * Set the plan property: The plan associated with this account.
- *
- * @param plan the plan value to set.
- * @return the SpatialAnchorsAccountInner object itself.
- */
- public SpatialAnchorsAccountInner withPlan(Identity plan) {
- this.plan = plan;
- return this;
- }
-
- /**
- * Get the sku property: The sku associated with this account.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku associated with this account.
- *
- * @param sku the sku value to set.
- * @return the SpatialAnchorsAccountInner object itself.
- */
- public SpatialAnchorsAccountInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /**
- * Get the kind property: The kind of account, if supported.
- *
- * @return the kind value.
- */
- public Sku kind() {
- return this.kind;
- }
-
- /**
- * Set the kind property: The kind of account, if supported.
- *
- * @param kind the kind value to set.
- * @return the SpatialAnchorsAccountInner object itself.
- */
- public SpatialAnchorsAccountInner withKind(Sku kind) {
- this.kind = kind;
- return this;
- }
-
- /**
- * Get the systemData property: System metadata for this account.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the type property: The type of the resource.
- *
- * @return the type value.
- */
- @Override
- public String type() {
- return this.type;
- }
-
- /**
- * Get the name property: The name of the resource.
- *
- * @return the name value.
- */
- @Override
- public String name() {
- return this.name;
- }
-
- /**
- * Get the id property: Fully qualified resource Id for the resource.
- *
- * @return the id value.
- */
- @Override
- public String id() {
- return this.id;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SpatialAnchorsAccountInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public SpatialAnchorsAccountInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @return the storageAccountName value.
- */
- public String storageAccountName() {
- return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
- }
-
- /**
- * Set the storageAccountName property: The name of the storage account associated with this accountId.
- *
- * @param storageAccountName the storageAccountName value to set.
- * @return the SpatialAnchorsAccountInner object itself.
- */
- public SpatialAnchorsAccountInner withStorageAccountName(String storageAccountName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MixedRealityAccountProperties();
- }
- this.innerProperties().withStorageAccountName(storageAccountName);
- return this;
- }
-
- /**
- * Get the accountId property: unique id of certain account.
- *
- * @return the accountId value.
- */
- public String accountId() {
- return this.innerProperties() == null ? null : this.innerProperties().accountId();
- }
-
- /**
- * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
- *
- * @return the accountDomain value.
- */
- public String accountDomain() {
- return this.innerProperties() == null ? null : this.innerProperties().accountDomain();
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (identity() != null) {
- identity().validate();
- }
- if (plan() != null) {
- plan().validate();
- }
- if (sku() != null) {
- sku().validate();
- }
- if (kind() != null) {
- kind().validate();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("properties", this.innerProperties);
- jsonWriter.writeJsonField("identity", this.identity);
- jsonWriter.writeJsonField("plan", this.plan);
- jsonWriter.writeJsonField("sku", this.sku);
- jsonWriter.writeJsonField("kind", this.kind);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of SpatialAnchorsAccountInner from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of SpatialAnchorsAccountInner if the JsonReader was pointing to an instance of it, or null if
- * it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the SpatialAnchorsAccountInner.
- */
- public static SpatialAnchorsAccountInner fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- SpatialAnchorsAccountInner deserializedSpatialAnchorsAccountInner = new SpatialAnchorsAccountInner();
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
-
- if ("id".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.id = reader.getString();
- } else if ("name".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.name = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedSpatialAnchorsAccountInner.withTags(tags);
- } else if ("properties".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.innerProperties
- = MixedRealityAccountProperties.fromJson(reader);
- } else if ("identity".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.identity = Identity.fromJson(reader);
- } else if ("plan".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.plan = Identity.fromJson(reader);
- } else if ("sku".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.sku = Sku.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.kind = Sku.fromJson(reader);
- } else if ("systemData".equals(fieldName)) {
- deserializedSpatialAnchorsAccountInner.systemData = SystemData.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
-
- return deserializedSpatialAnchorsAccountInner;
- });
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/package-info.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/package-info.java
deleted file mode 100644
index d2df10e0bff6..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/package-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-/**
- * Package containing the inner data models for MixedRealityClient.
- * Mixed Reality Client.
- */
-package com.azure.resourcemanager.mixedreality.fluent.models;
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/package-info.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/package-info.java
deleted file mode 100644
index 1719f58885c7..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/package-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-/**
- * Package containing the service clients for MixedRealityClient.
- * Mixed Reality Client.
- */
-package com.azure.resourcemanager.mixedreality.fluent;
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/AccountKeysImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/AccountKeysImpl.java
deleted file mode 100644
index 9972996c31cd..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/AccountKeysImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeys;
-
-public final class AccountKeysImpl implements AccountKeys {
- private AccountKeysInner innerObject;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- AccountKeysImpl(AccountKeysInner innerObject,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String primaryKey() {
- return this.innerModel().primaryKey();
- }
-
- public String secondaryKey() {
- return this.innerModel().secondaryKey();
- }
-
- public AccountKeysInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/CheckNameAvailabilityResponseImpl.java
deleted file mode 100644
index 2c70e82d3336..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/CheckNameAvailabilityResponseImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityResponse;
-import com.azure.resourcemanager.mixedreality.models.NameUnavailableReason;
-
-public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse {
- private CheckNameAvailabilityResponseInner innerObject;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public boolean nameAvailable() {
- return this.innerModel().nameAvailable();
- }
-
- public NameUnavailableReason reason() {
- return this.innerModel().reason();
- }
-
- public String message() {
- return this.innerModel().message();
- }
-
- public CheckNameAvailabilityResponseInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java
deleted file mode 100644
index 1a4d2b91fba6..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.ServiceClientBuilder;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.RetryPolicy;
-import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerAdapter;
-import java.time.Duration;
-
-/**
- * A builder for creating a new instance of the MixedRealityClientImpl type.
- */
-@ServiceClientBuilder(serviceClients = { MixedRealityClientImpl.class })
-public final class MixedRealityClientBuilder {
- /*
- * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
- */
- private String subscriptionId;
-
- /**
- * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- *
- * @param subscriptionId the subscriptionId value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
- return this;
- }
-
- /*
- * server parameter
- */
- private String endpoint;
-
- /**
- * Sets server parameter.
- *
- * @param endpoint the endpoint value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
- return this;
- }
-
- /*
- * The environment to connect to
- */
- private AzureEnvironment environment;
-
- /**
- * Sets The environment to connect to.
- *
- * @param environment the environment value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder environment(AzureEnvironment environment) {
- this.environment = environment;
- return this;
- }
-
- /*
- * The HTTP pipeline to send requests through
- */
- private HttpPipeline pipeline;
-
- /**
- * Sets The HTTP pipeline to send requests through.
- *
- * @param pipeline the pipeline value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
- return this;
- }
-
- /*
- * The default poll interval for long-running operation
- */
- private Duration defaultPollInterval;
-
- /**
- * Sets The default poll interval for long-running operation.
- *
- * @param defaultPollInterval the defaultPollInterval value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
- return this;
- }
-
- /*
- * The serializer to serialize an object into a string
- */
- private SerializerAdapter serializerAdapter;
-
- /**
- * Sets The serializer to serialize an object into a string.
- *
- * @param serializerAdapter the serializerAdapter value.
- * @return the MixedRealityClientBuilder.
- */
- public MixedRealityClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
- this.serializerAdapter = serializerAdapter;
- return this;
- }
-
- /**
- * Builds an instance of MixedRealityClientImpl with the provided parameters.
- *
- * @return an instance of MixedRealityClientImpl.
- */
- public MixedRealityClientImpl buildClient() {
- String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
- AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
- HttpPipeline localPipeline = (pipeline != null)
- ? pipeline
- : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- Duration localDefaultPollInterval
- = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
- SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
- ? serializerAdapter
- : SerializerFactory.createDefaultManagementSerializerAdapter();
- MixedRealityClientImpl client = new MixedRealityClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
- return client;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java
deleted file mode 100644
index e67fc823cf29..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.ServiceClient;
-import com.azure.core.http.HttpHeaderName;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.Response;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.exception.ManagementError;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
-import com.azure.core.management.polling.PollerFactory;
-import com.azure.core.util.Context;
-import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.core.util.polling.AsyncPollResponse;
-import com.azure.core.util.polling.LongRunningOperationStatus;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.core.util.serializer.SerializerAdapter;
-import com.azure.core.util.serializer.SerializerEncoding;
-import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient;
-import com.azure.resourcemanager.mixedreality.fluent.OperationsClient;
-import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient;
-import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient;
-import com.azure.resourcemanager.mixedreality.fluent.SpatialAnchorsAccountsClient;
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.time.Duration;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-/**
- * Initializes a new instance of the MixedRealityClientImpl type.
- */
-@ServiceClient(builder = MixedRealityClientBuilder.class)
-public final class MixedRealityClientImpl implements MixedRealityClient {
- /**
- * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- */
- private final String subscriptionId;
-
- /**
- * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
- */
- private final String endpoint;
-
- /**
- * Gets server parameter.
- *
- * @return the endpoint value.
- */
- public String getEndpoint() {
- return this.endpoint;
- }
-
- /**
- * Api Version.
- */
- private final String apiVersion;
-
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- public String getApiVersion() {
- return this.apiVersion;
- }
-
- /**
- * The HTTP pipeline to send requests through.
- */
- private final HttpPipeline httpPipeline;
-
- /**
- * Gets The HTTP pipeline to send requests through.
- *
- * @return the httpPipeline value.
- */
- public HttpPipeline getHttpPipeline() {
- return this.httpPipeline;
- }
-
- /**
- * The serializer to serialize an object into a string.
- */
- private final SerializerAdapter serializerAdapter;
-
- /**
- * Gets The serializer to serialize an object into a string.
- *
- * @return the serializerAdapter value.
- */
- SerializerAdapter getSerializerAdapter() {
- return this.serializerAdapter;
- }
-
- /**
- * The default poll interval for long-running operation.
- */
- private final Duration defaultPollInterval;
-
- /**
- * Gets The default poll interval for long-running operation.
- *
- * @return the defaultPollInterval value.
- */
- public Duration getDefaultPollInterval() {
- return this.defaultPollInterval;
- }
-
- /**
- * The OperationsClient object to access its operations.
- */
- private final OperationsClient operations;
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- public OperationsClient getOperations() {
- return this.operations;
- }
-
- /**
- * The ResourceProvidersClient object to access its operations.
- */
- private final ResourceProvidersClient resourceProviders;
-
- /**
- * Gets the ResourceProvidersClient object to access its operations.
- *
- * @return the ResourceProvidersClient object.
- */
- public ResourceProvidersClient getResourceProviders() {
- return this.resourceProviders;
- }
-
- /**
- * The SpatialAnchorsAccountsClient object to access its operations.
- */
- private final SpatialAnchorsAccountsClient spatialAnchorsAccounts;
-
- /**
- * Gets the SpatialAnchorsAccountsClient object to access its operations.
- *
- * @return the SpatialAnchorsAccountsClient object.
- */
- public SpatialAnchorsAccountsClient getSpatialAnchorsAccounts() {
- return this.spatialAnchorsAccounts;
- }
-
- /**
- * The RemoteRenderingAccountsClient object to access its operations.
- */
- private final RemoteRenderingAccountsClient remoteRenderingAccounts;
-
- /**
- * Gets the RemoteRenderingAccountsClient object to access its operations.
- *
- * @return the RemoteRenderingAccountsClient object.
- */
- public RemoteRenderingAccountsClient getRemoteRenderingAccounts() {
- return this.remoteRenderingAccounts;
- }
-
- /**
- * Initializes an instance of MixedRealityClient client.
- *
- * @param httpPipeline The HTTP pipeline to send requests through.
- * @param serializerAdapter The serializer to serialize an object into a string.
- * @param defaultPollInterval The default poll interval for long-running operation.
- * @param environment The Azure environment.
- * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.
- * 00000000-0000-0000-0000-000000000000).
- * @param endpoint server parameter.
- */
- MixedRealityClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
- AzureEnvironment environment, String subscriptionId, String endpoint) {
- this.httpPipeline = httpPipeline;
- this.serializerAdapter = serializerAdapter;
- this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
- this.endpoint = endpoint;
- this.apiVersion = "2021-01-01";
- this.operations = new OperationsClientImpl(this);
- this.resourceProviders = new ResourceProvidersClientImpl(this);
- this.spatialAnchorsAccounts = new SpatialAnchorsAccountsClientImpl(this);
- this.remoteRenderingAccounts = new RemoteRenderingAccountsClientImpl(this);
- }
-
- /**
- * Gets default client context.
- *
- * @return the default client context.
- */
- public Context getContext() {
- return Context.NONE;
- }
-
- /**
- * Merges default client context with provided context.
- *
- * @param context the context to be merged with default client context.
- * @return the merged context.
- */
- public Context mergeContext(Context context) {
- return CoreUtils.mergeContexts(this.getContext(), context);
- }
-
- /**
- * Gets long running operation result.
- *
- * @param activationResponse the response of activation operation.
- * @param httpPipeline the http pipeline.
- * @param pollResultType type of poll result.
- * @param finalResultType type of final result.
- * @param context the context shared by all requests.
- * @param type of poll result.
- * @param type of final result.
- * @return poller flux for poll result and final result.
- */
- public PollerFlux, U> getLroResult(Mono>> activationResponse,
- HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
- return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
- defaultPollInterval, activationResponse, context);
- }
-
- /**
- * Gets the final result, or an error, based on last async poll response.
- *
- * @param response the last async poll response.
- * @param type of poll result.
- * @param type of final result.
- * @return the final result, or an error.
- */
- public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
- if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
- String errorMessage;
- ManagementError managementError = null;
- HttpResponse errorResponse = null;
- PollResult.Error lroError = response.getValue().getError();
- if (lroError != null) {
- errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
- lroError.getResponseBody());
-
- errorMessage = response.getValue().getError().getMessage();
- String errorBody = response.getValue().getError().getResponseBody();
- if (errorBody != null) {
- // try to deserialize error body to ManagementError
- try {
- managementError = this.getSerializerAdapter()
- .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
- if (managementError.getCode() == null || managementError.getMessage() == null) {
- managementError = null;
- }
- } catch (IOException | RuntimeException ioe) {
- LOGGER.logThrowableAsWarning(ioe);
- }
- }
- } else {
- // fallback to default error message
- errorMessage = "Long running operation failed.";
- }
- if (managementError == null) {
- // fallback to default ManagementError
- managementError = new ManagementError(response.getStatus().toString(), errorMessage);
- }
- return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
- } else {
- return response.getFinalResult();
- }
- }
-
- private static final class HttpResponseImpl extends HttpResponse {
- private final int statusCode;
-
- private final byte[] responseBody;
-
- private final HttpHeaders httpHeaders;
-
- HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
- super(null);
- this.statusCode = statusCode;
- this.httpHeaders = httpHeaders;
- this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
- }
-
- public int getStatusCode() {
- return statusCode;
- }
-
- public String getHeaderValue(String s) {
- return httpHeaders.getValue(HttpHeaderName.fromString(s));
- }
-
- public HttpHeaders getHeaders() {
- return httpHeaders;
- }
-
- public Flux getBody() {
- return Flux.just(ByteBuffer.wrap(responseBody));
- }
-
- public Mono getBodyAsByteArray() {
- return Mono.just(responseBody);
- }
-
- public Mono getBodyAsString() {
- return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
- }
-
- public Mono getBodyAsString(Charset charset) {
- return Mono.just(new String(responseBody, charset));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(MixedRealityClientImpl.class);
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationImpl.java
deleted file mode 100644
index 0052c788ffa6..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner;
-import com.azure.resourcemanager.mixedreality.models.Operation;
-import com.azure.resourcemanager.mixedreality.models.OperationDisplay;
-import com.azure.resourcemanager.mixedreality.models.OperationProperties;
-
-public final class OperationImpl implements Operation {
- private OperationInner innerObject;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- OperationImpl(OperationInner innerObject,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public OperationDisplay display() {
- return this.innerModel().display();
- }
-
- public Boolean isDataAction() {
- return this.innerModel().isDataAction();
- }
-
- public String origin() {
- return this.innerModel().origin();
- }
-
- public OperationProperties properties() {
- return this.innerModel().properties();
- }
-
- public OperationInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java
deleted file mode 100644
index 38971f3e8d0c..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java
+++ /dev/null
@@ -1,233 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.mixedreality.fluent.OperationsClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner;
-import com.azure.resourcemanager.mixedreality.models.OperationPage;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in OperationsClient.
- */
-public final class OperationsClientImpl implements OperationsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final OperationsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final MixedRealityClientImpl client;
-
- /**
- * Initializes an instance of OperationsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- OperationsClientImpl(MixedRealityClientImpl client) {
- this.service
- = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for MixedRealityClientOperations to be used by the proxy service to
- * perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "MixedRealityClientOp")
- public interface OperationsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/providers/Microsoft.MixedReality/operations")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Exposing Available Operations.
- *
- * @throws 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 Resource Provider operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Exposing Available Operations.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 Resource Provider operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Exposing Available Operations.
- *
- * @throws 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 Resource Provider operations as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Exposing Available Operations.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 Resource Provider operations as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Exposing Available Operations.
- *
- * @throws 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 Resource Provider operations as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- return new PagedIterable<>(listAsync());
- }
-
- /**
- * Exposing Available Operations.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 Resource Provider operations as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 Resource Provider operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 Resource Provider operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java
deleted file mode 100644
index c79a613ba20d..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mixedreality.fluent.OperationsClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner;
-import com.azure.resourcemanager.mixedreality.models.Operation;
-import com.azure.resourcemanager.mixedreality.models.Operations;
-
-public final class OperationsImpl implements Operations {
- private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
-
- private final OperationsClient innerClient;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- public OperationsImpl(OperationsClient innerClient,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
- }
-
- private OperationsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountImpl.java
deleted file mode 100644
index cb85308a5aad..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.Response;
-import com.azure.core.management.Region;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.AccountKeys;
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
-import com.azure.resourcemanager.mixedreality.models.Sku;
-import java.util.Collections;
-import java.util.Map;
-
-public final class RemoteRenderingAccountImpl
- implements RemoteRenderingAccount, RemoteRenderingAccount.Definition, RemoteRenderingAccount.Update {
- private RemoteRenderingAccountInner innerObject;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public Map tags() {
- Map inner = this.innerModel().tags();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public Identity identity() {
- return this.innerModel().identity();
- }
-
- public Identity plan() {
- return this.innerModel().plan();
- }
-
- public Sku sku() {
- return this.innerModel().sku();
- }
-
- public Sku kind() {
- return this.innerModel().kind();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String storageAccountName() {
- return this.innerModel().storageAccountName();
- }
-
- public String accountId() {
- return this.innerModel().accountId();
- }
-
- public String accountDomain() {
- return this.innerModel().accountDomain();
- }
-
- public Region region() {
- return Region.fromName(this.regionName());
- }
-
- public String regionName() {
- return this.location();
- }
-
- public String resourceGroupName() {
- return resourceGroupName;
- }
-
- public RemoteRenderingAccountInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String accountName;
-
- public RemoteRenderingAccountImpl withExistingResourceGroup(String resourceGroupName) {
- this.resourceGroupName = resourceGroupName;
- return this;
- }
-
- public RemoteRenderingAccount create() {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .createWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public RemoteRenderingAccount create(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .createWithResponse(resourceGroupName, accountName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- RemoteRenderingAccountImpl(String name, com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = new RemoteRenderingAccountInner();
- this.serviceManager = serviceManager;
- this.accountName = name;
- }
-
- public RemoteRenderingAccountImpl update() {
- return this;
- }
-
- public RemoteRenderingAccount apply() {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public RemoteRenderingAccount apply(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .updateWithResponse(resourceGroupName, accountName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- RemoteRenderingAccountImpl(RemoteRenderingAccountInner innerObject,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "remoteRenderingAccounts");
- }
-
- public RemoteRenderingAccount refresh() {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
- .getValue();
- return this;
- }
-
- public RemoteRenderingAccount refresh(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getRemoteRenderingAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, accountName, context)
- .getValue();
- return this;
- }
-
- public Response listKeysWithResponse(Context context) {
- return serviceManager.remoteRenderingAccounts().listKeysWithResponse(resourceGroupName, accountName, context);
- }
-
- public AccountKeys listKeys() {
- return serviceManager.remoteRenderingAccounts().listKeys(resourceGroupName, accountName);
- }
-
- public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) {
- return serviceManager.remoteRenderingAccounts()
- .regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
- }
-
- public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) {
- return serviceManager.remoteRenderingAccounts().regenerateKeys(resourceGroupName, accountName, regenerate);
- }
-
- public RemoteRenderingAccountImpl withRegion(Region location) {
- this.innerModel().withLocation(location.toString());
- return this;
- }
-
- public RemoteRenderingAccountImpl withRegion(String location) {
- this.innerModel().withLocation(location);
- return this;
- }
-
- public RemoteRenderingAccountImpl withTags(Map tags) {
- this.innerModel().withTags(tags);
- return this;
- }
-
- public RemoteRenderingAccountImpl withIdentity(Identity identity) {
- this.innerModel().withIdentity(identity);
- return this;
- }
-
- public RemoteRenderingAccountImpl withPlan(Identity plan) {
- this.innerModel().withPlan(plan);
- return this;
- }
-
- public RemoteRenderingAccountImpl withSku(Sku sku) {
- this.innerModel().withSku(sku);
- return this;
- }
-
- public RemoteRenderingAccountImpl withKind(Sku kind) {
- this.innerModel().withKind(kind);
- return this;
- }
-
- public RemoteRenderingAccountImpl withStorageAccountName(String storageAccountName) {
- this.innerModel().withStorageAccountName(storageAccountName);
- return this;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java
deleted file mode 100644
index 8bcf591be6f7..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java
+++ /dev/null
@@ -1,1275 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.Patch;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.Put;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccountPage;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in RemoteRenderingAccountsClient.
- */
-public final class RemoteRenderingAccountsClientImpl implements RemoteRenderingAccountsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final RemoteRenderingAccountsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final MixedRealityClientImpl client;
-
- /**
- * Initializes an instance of RemoteRenderingAccountsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- RemoteRenderingAccountsClientImpl(MixedRealityClientImpl client) {
- this.service = RestProxy.create(RemoteRenderingAccountsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for MixedRealityClientRemoteRenderingAccounts to be used by the proxy
- * service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "MixedRealityClientRe")
- public interface RemoteRenderingAccountsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}")
- @ExpectedResponses({ 200, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") RemoteRenderingAccountInner remoteRenderingAccount,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") RemoteRenderingAccountInner remoteRenderingAccount,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listKeys(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> regenerateKeys(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") AccountKeyRegenerateRequest regenerate, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @throws 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 get resource collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @throws 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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- return new PagedIterable<>(listAsync());
- }
-
- /**
- * List Remote Rendering Accounts by Subscription.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByResourceGroupSinglePageAsync(String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(),
- this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
- }
-
- /**
- * List Resources by Resource Group.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
- }
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String accountName) {
- return deleteWithResponseAsync(resourceGroupName, accountName).flatMap(ignored -> Mono.empty());
- }
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, accountName, context).block();
- }
-
- /**
- * Delete a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String accountName) {
- deleteWithResponse(resourceGroupName, accountName, Context.NONE);
- }
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String accountName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String accountName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName,
- String accountName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block();
- }
-
- /**
- * Retrieve a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RemoteRenderingAccountInner getByResourceGroup(String resourceGroupName, String accountName) {
- return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
- }
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(String resourceGroupName,
- String accountName, RemoteRenderingAccountInner remoteRenderingAccount) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (remoteRenderingAccount == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter remoteRenderingAccount is required and cannot be null."));
- } else {
- remoteRenderingAccount.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), remoteRenderingAccount, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(String resourceGroupName,
- String accountName, RemoteRenderingAccountInner remoteRenderingAccount, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (remoteRenderingAccount == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter remoteRenderingAccount is required and cannot be null."));
- } else {
- remoteRenderingAccount.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), remoteRenderingAccount, accept, context);
- }
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount) {
- return updateWithResponseAsync(resourceGroupName, accountName, remoteRenderingAccount)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount, Context context) {
- return updateWithResponseAsync(resourceGroupName, accountName, remoteRenderingAccount, context).block();
- }
-
- /**
- * Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RemoteRenderingAccountInner update(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount) {
- return updateWithResponse(resourceGroupName, accountName, remoteRenderingAccount, Context.NONE).getValue();
- }
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(String resourceGroupName,
- String accountName, RemoteRenderingAccountInner remoteRenderingAccount) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (remoteRenderingAccount == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter remoteRenderingAccount is required and cannot be null."));
- } else {
- remoteRenderingAccount.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), remoteRenderingAccount, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(String resourceGroupName,
- String accountName, RemoteRenderingAccountInner remoteRenderingAccount, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (remoteRenderingAccount == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter remoteRenderingAccount is required and cannot be null."));
- } else {
- remoteRenderingAccount.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), remoteRenderingAccount, accept, context);
- }
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount) {
- return createWithResponseAsync(resourceGroupName, accountName, remoteRenderingAccount)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount, Context context) {
- return createWithResponseAsync(resourceGroupName, accountName, remoteRenderingAccount, context).block();
- }
-
- /**
- * Creating or Updating a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param remoteRenderingAccount Remote Rendering Account parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return remoteRenderingAccount Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RemoteRenderingAccountInner create(String resourceGroupName, String accountName,
- RemoteRenderingAccountInner remoteRenderingAccount) {
- return createWithResponse(resourceGroupName, accountName, remoteRenderingAccount, Context.NONE).getValue();
- }
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listKeysWithResponseAsync(String resourceGroupName, String accountName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listKeysWithResponseAsync(String resourceGroupName, String accountName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listKeysAsync(String resourceGroupName, String accountName) {
- return listKeysWithResponseAsync(resourceGroupName, accountName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response listKeysWithResponse(String resourceGroupName, String accountName,
- Context context) {
- return listKeysWithResponseAsync(resourceGroupName, accountName, context).block();
- }
-
- /**
- * List Both of the 2 Keys of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AccountKeysInner listKeys(String resourceGroupName, String accountName) {
- return listKeysWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
- }
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> regenerateKeysWithResponseAsync(String resourceGroupName,
- String accountName, AccountKeyRegenerateRequest regenerate) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (regenerate == null) {
- return Mono.error(new IllegalArgumentException("Parameter regenerate is required and cannot be null."));
- } else {
- regenerate.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, accountName, this.client.getApiVersion(), regenerate, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> regenerateKeysWithResponseAsync(String resourceGroupName,
- String accountName, AccountKeyRegenerateRequest regenerate, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (accountName == null) {
- return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
- }
- if (regenerate == null) {
- return Mono.error(new IllegalArgumentException("Parameter regenerate is required and cannot be null."));
- } else {
- regenerate.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- accountName, this.client.getApiVersion(), regenerate, accept, context);
- }
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono regenerateKeysAsync(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate) {
- return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response regenerateKeysWithResponse(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate, Context context) {
- return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate, context).block();
- }
-
- /**
- * Regenerate specified Key of a Remote Rendering Account.
- *
- * @param resourceGroupName Name of an Azure resource group.
- * @param accountName Name of an Mixed Reality Account.
- * @param regenerate Required information for key regeneration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return developer Keys of account.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AccountKeysInner regenerateKeys(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate) {
- return regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, Context.NONE).getValue();
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
- Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 get resource collection along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
- Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java
deleted file mode 100644
index 28c596d95717..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.SimpleResponse;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.AccountKeys;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
-import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccounts;
-
-public final class RemoteRenderingAccountsImpl implements RemoteRenderingAccounts {
- private static final ClientLogger LOGGER = new ClientLogger(RemoteRenderingAccountsImpl.class);
-
- private final RemoteRenderingAccountsClient innerClient;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- public RemoteRenderingAccountsImpl(RemoteRenderingAccountsClient innerClient,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new RemoteRenderingAccountImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new RemoteRenderingAccountImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new RemoteRenderingAccountImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- PagedIterable inner
- = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new RemoteRenderingAccountImpl(inner1, this.manager()));
- }
-
- public Response deleteByResourceGroupWithResponse(String resourceGroupName, String accountName,
- Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context);
- }
-
- public void deleteByResourceGroup(String resourceGroupName, String accountName) {
- this.serviceClient().delete(resourceGroupName, accountName);
- }
-
- public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
- Context context) {
- Response inner
- = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new RemoteRenderingAccountImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public RemoteRenderingAccount getByResourceGroup(String resourceGroupName, String accountName) {
- RemoteRenderingAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName);
- if (inner != null) {
- return new RemoteRenderingAccountImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response listKeysWithResponse(String resourceGroupName, String accountName, Context context) {
- Response inner
- = this.serviceClient().listKeysWithResponse(resourceGroupName, accountName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AccountKeysImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public AccountKeys listKeys(String resourceGroupName, String accountName) {
- AccountKeysInner inner = this.serviceClient().listKeys(resourceGroupName, accountName);
- if (inner != null) {
- return new AccountKeysImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response regenerateKeysWithResponse(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate, Context context) {
- Response inner
- = this.serviceClient().regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AccountKeysImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public AccountKeys regenerateKeys(String resourceGroupName, String accountName,
- AccountKeyRegenerateRequest regenerate) {
- AccountKeysInner inner = this.serviceClient().regenerateKeys(resourceGroupName, accountName, regenerate);
- if (inner != null) {
- return new AccountKeysImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public RemoteRenderingAccount getById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = ResourceManagerUtils.getValueFromIdByName(id, "remoteRenderingAccounts");
- if (accountName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
- }
-
- public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = ResourceManagerUtils.getValueFromIdByName(id, "remoteRenderingAccounts");
- if (accountName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.", id)));
- }
- return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context);
- }
-
- public void deleteById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = ResourceManagerUtils.getValueFromIdByName(id, "remoteRenderingAccounts");
- if (accountName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.", id)));
- }
- this.deleteByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE);
- }
-
- public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = ResourceManagerUtils.getValueFromIdByName(id, "remoteRenderingAccounts");
- if (accountName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
- .format("The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.", id)));
- }
- return this.deleteByResourceGroupWithResponse(resourceGroupName, accountName, context);
- }
-
- private RemoteRenderingAccountsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-
- public RemoteRenderingAccountImpl define(String name) {
- return new RemoteRenderingAccountImpl(name, this.manager());
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceManagerUtils.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceManagerUtils.java
deleted file mode 100644
index 408dedef2df1..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceManagerUtils.java
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.util.CoreUtils;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-import reactor.core.publisher.Flux;
-
-final class ResourceManagerUtils {
- private ResourceManagerUtils() {
- }
-
- static String getValueFromIdByName(String id, String name) {
- if (id == null) {
- return null;
- }
- Iterator itr = Arrays.stream(id.split("/")).iterator();
- while (itr.hasNext()) {
- String part = itr.next();
- if (part != null && !part.trim().isEmpty()) {
- if (part.equalsIgnoreCase(name)) {
- if (itr.hasNext()) {
- return itr.next();
- } else {
- return null;
- }
- }
- }
- }
- return null;
- }
-
- static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
- if (id == null || pathTemplate == null) {
- return null;
- }
- String parameterNameParentheses = "{" + parameterName + "}";
- List idSegmentsReverted = Arrays.asList(id.split("/"));
- List pathSegments = Arrays.asList(pathTemplate.split("/"));
- Collections.reverse(idSegmentsReverted);
- Iterator idItrReverted = idSegmentsReverted.iterator();
- int pathIndex = pathSegments.size();
- while (idItrReverted.hasNext() && pathIndex > 0) {
- String idSegment = idItrReverted.next();
- String pathSegment = pathSegments.get(--pathIndex);
- if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
- if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
- if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
- List segments = new ArrayList<>();
- segments.add(idSegment);
- idItrReverted.forEachRemaining(segments::add);
- Collections.reverse(segments);
- if (!segments.isEmpty() && segments.get(0).isEmpty()) {
- segments.remove(0);
- }
- return String.join("/", segments);
- } else {
- return idSegment;
- }
- }
- }
- }
- return null;
- }
-
- static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
- return new PagedIterableImpl<>(pageIterable, mapper);
- }
-
- private static final class PagedIterableImpl extends PagedIterable {
-
- private final PagedIterable pagedIterable;
- private final Function mapper;
- private final Function, PagedResponse> pageMapper;
-
- private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
- super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
- .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
- this.pagedIterable = pagedIterable;
- this.mapper = mapper;
- this.pageMapper = getPageMapper(mapper);
- }
-
- private static Function, PagedResponse> getPageMapper(Function mapper) {
- return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
- page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
- null);
- }
-
- @Override
- public Stream stream() {
- return pagedIterable.stream().map(mapper);
- }
-
- @Override
- public Stream> streamByPage() {
- return pagedIterable.streamByPage().map(pageMapper);
- }
-
- @Override
- public Stream> streamByPage(String continuationToken) {
- return pagedIterable.streamByPage(continuationToken).map(pageMapper);
- }
-
- @Override
- public Stream> streamByPage(int preferredPageSize) {
- return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
- }
-
- @Override
- public Stream> streamByPage(String continuationToken, int preferredPageSize) {
- return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
- }
-
- @Override
- public Iterator iterator() {
- return new IteratorImpl<>(pagedIterable.iterator(), mapper);
- }
-
- @Override
- public Iterable> iterableByPage() {
- return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
- }
-
- @Override
- public Iterable> iterableByPage(String continuationToken) {
- return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
- }
-
- @Override
- public Iterable> iterableByPage(int preferredPageSize) {
- return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
- }
-
- @Override
- public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
- return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
- }
- }
-
- private static final class IteratorImpl implements Iterator {
-
- private final Iterator iterator;
- private final Function mapper;
-
- private IteratorImpl(Iterator iterator, Function mapper) {
- this.iterator = iterator;
- this.mapper = mapper;
- }
-
- @Override
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- @Override
- public S next() {
- return mapper.apply(iterator.next());
- }
-
- @Override
- public void remove() {
- iterator.remove();
- }
- }
-
- private static final class IterableImpl implements Iterable {
-
- private final Iterable iterable;
- private final Function mapper;
-
- private IterableImpl(Iterable iterable, Function mapper) {
- this.iterable = iterable;
- this.mapper = mapper;
- }
-
- @Override
- public Iterator iterator() {
- return new IteratorImpl<>(iterable.iterator(), mapper);
- }
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java
deleted file mode 100644
index df525985dd04..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in ResourceProvidersClient.
- */
-public final class ResourceProvidersClientImpl implements ResourceProvidersClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final ResourceProvidersService service;
-
- /**
- * The service client containing this operation class.
- */
- private final MixedRealityClientImpl client;
-
- /**
- * Initializes an instance of ResourceProvidersClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- ResourceProvidersClientImpl(MixedRealityClientImpl client) {
- this.service
- = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for MixedRealityClientResourceProviders to be used by the proxy service
- * to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "MixedRealityClientRe")
- public interface ResourceProvidersService {
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> checkNameAvailabilityLocal(
- @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("location") String location, @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailability,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> checkNameAvailabilityLocalWithResponseAsync(
- String location, CheckNameAvailabilityRequest checkNameAvailability) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (location == null) {
- return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
- }
- if (checkNameAvailability == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter checkNameAvailability is required and cannot be null."));
- } else {
- checkNameAvailability.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.checkNameAvailabilityLocal(this.client.getEndpoint(),
- this.client.getSubscriptionId(), location, this.client.getApiVersion(), checkNameAvailability, accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> checkNameAvailabilityLocalWithResponseAsync(
- String location, CheckNameAvailabilityRequest checkNameAvailability, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (location == null) {
- return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));
- }
- if (checkNameAvailability == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter checkNameAvailability is required and cannot be null."));
- } else {
- checkNameAvailability.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.checkNameAvailabilityLocal(this.client.getEndpoint(), this.client.getSubscriptionId(), location,
- this.client.getApiVersion(), checkNameAvailability, accept, context);
- }
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono checkNameAvailabilityLocalAsync(String location,
- CheckNameAvailabilityRequest checkNameAvailability) {
- return checkNameAvailabilityLocalWithResponseAsync(location, checkNameAvailability)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response checkNameAvailabilityLocalWithResponse(String location,
- CheckNameAvailabilityRequest checkNameAvailability, Context context) {
- return checkNameAvailabilityLocalWithResponseAsync(location, checkNameAvailability, context).block();
- }
-
- /**
- * Check Name Availability for local uniqueness.
- *
- * @param location The location in which uniqueness will be verified.
- * @param checkNameAvailability Check Name Availability Request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return check Name Availability Response.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CheckNameAvailabilityResponseInner checkNameAvailabilityLocal(String location,
- CheckNameAvailabilityRequest checkNameAvailability) {
- return checkNameAvailabilityLocalWithResponse(location, checkNameAvailability, Context.NONE).getValue();
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java
deleted file mode 100644
index e7035031a8cc..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.SimpleResponse;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
-import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityResponse;
-import com.azure.resourcemanager.mixedreality.models.ResourceProviders;
-
-public final class ResourceProvidersImpl implements ResourceProviders {
- private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class);
-
- private final ResourceProvidersClient innerClient;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- public ResourceProvidersImpl(ResourceProvidersClient innerClient,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public Response checkNameAvailabilityLocalWithResponse(String location,
- CheckNameAvailabilityRequest checkNameAvailability, Context context) {
- Response inner
- = this.serviceClient().checkNameAvailabilityLocalWithResponse(location, checkNameAvailability, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public CheckNameAvailabilityResponse checkNameAvailabilityLocal(String location,
- CheckNameAvailabilityRequest checkNameAvailability) {
- CheckNameAvailabilityResponseInner inner
- = this.serviceClient().checkNameAvailabilityLocal(location, checkNameAvailability);
- if (inner != null) {
- return new CheckNameAvailabilityResponseImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- private ResourceProvidersClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountImpl.java
deleted file mode 100644
index e379c366002c..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.http.rest.Response;
-import com.azure.core.management.Region;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.AccountKeys;
-import com.azure.resourcemanager.mixedreality.models.Identity;
-import com.azure.resourcemanager.mixedreality.models.Sku;
-import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount;
-import java.util.Collections;
-import java.util.Map;
-
-public final class SpatialAnchorsAccountImpl
- implements SpatialAnchorsAccount, SpatialAnchorsAccount.Definition, SpatialAnchorsAccount.Update {
- private SpatialAnchorsAccountInner innerObject;
-
- private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public String location() {
- return this.innerModel().location();
- }
-
- public Map tags() {
- Map inner = this.innerModel().tags();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public Identity identity() {
- return this.innerModel().identity();
- }
-
- public Identity plan() {
- return this.innerModel().plan();
- }
-
- public Sku sku() {
- return this.innerModel().sku();
- }
-
- public Sku kind() {
- return this.innerModel().kind();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public String storageAccountName() {
- return this.innerModel().storageAccountName();
- }
-
- public String accountId() {
- return this.innerModel().accountId();
- }
-
- public String accountDomain() {
- return this.innerModel().accountDomain();
- }
-
- public Region region() {
- return Region.fromName(this.regionName());
- }
-
- public String regionName() {
- return this.location();
- }
-
- public String resourceGroupName() {
- return resourceGroupName;
- }
-
- public SpatialAnchorsAccountInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String accountName;
-
- public SpatialAnchorsAccountImpl withExistingResourceGroup(String resourceGroupName) {
- this.resourceGroupName = resourceGroupName;
- return this;
- }
-
- public SpatialAnchorsAccount create() {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .createWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public SpatialAnchorsAccount create(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .createWithResponse(resourceGroupName, accountName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- SpatialAnchorsAccountImpl(String name, com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = new SpatialAnchorsAccountInner();
- this.serviceManager = serviceManager;
- this.accountName = name;
- }
-
- public SpatialAnchorsAccountImpl update() {
- return this;
- }
-
- public SpatialAnchorsAccount apply() {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public SpatialAnchorsAccount apply(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .updateWithResponse(resourceGroupName, accountName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- SpatialAnchorsAccountImpl(SpatialAnchorsAccountInner innerObject,
- com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "spatialAnchorsAccounts");
- }
-
- public SpatialAnchorsAccount refresh() {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
- .getValue();
- return this;
- }
-
- public SpatialAnchorsAccount refresh(Context context) {
- this.innerObject = serviceManager.serviceClient()
- .getSpatialAnchorsAccounts()
- .getByResourceGroupWithResponse(resourceGroupName, accountName, context)
- .getValue();
- return this;
- }
-
- public Response listKeysWithResponse(Context context) {
- return serviceManager.spatialAnchorsAccounts().listKeysWithResponse(resourceGroupName, accountName, context);
- }
-
- public AccountKeys listKeys() {
- return serviceManager.spatialAnchorsAccounts().listKeys(resourceGroupName, accountName);
- }
-
- public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) {
- return serviceManager.spatialAnchorsAccounts()
- .regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
- }
-
- public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) {
- return serviceManager.spatialAnchorsAccounts().regenerateKeys(resourceGroupName, accountName, regenerate);
- }
-
- public SpatialAnchorsAccountImpl withRegion(Region location) {
- this.innerModel().withLocation(location.toString());
- return this;
- }
-
- public SpatialAnchorsAccountImpl withRegion(String location) {
- this.innerModel().withLocation(location);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withTags(Map tags) {
- this.innerModel().withTags(tags);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withIdentity(Identity identity) {
- this.innerModel().withIdentity(identity);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withPlan(Identity plan) {
- this.innerModel().withPlan(plan);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withSku(Sku sku) {
- this.innerModel().withSku(sku);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withKind(Sku kind) {
- this.innerModel().withKind(kind);
- return this;
- }
-
- public SpatialAnchorsAccountImpl withStorageAccountName(String storageAccountName) {
- this.innerModel().withStorageAccountName(storageAccountName);
- return this;
- }
-}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java
deleted file mode 100644
index ead1188d2081..000000000000
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java
+++ /dev/null
@@ -1,1275 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mixedreality.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.Patch;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.Put;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.mixedreality.fluent.SpatialAnchorsAccountsClient;
-import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
-import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner;
-import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
-import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccountPage;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in SpatialAnchorsAccountsClient.
- */
-public final class SpatialAnchorsAccountsClientImpl implements SpatialAnchorsAccountsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final SpatialAnchorsAccountsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final MixedRealityClientImpl client;
-
- /**
- * Initializes an instance of SpatialAnchorsAccountsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- SpatialAnchorsAccountsClientImpl(MixedRealityClientImpl client) {
- this.service = RestProxy.create(SpatialAnchorsAccountsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for MixedRealityClientSpatialAnchorsAccounts to be used by the proxy
- * service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "MixedRealityClientSp")
- public interface SpatialAnchorsAccountsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/spatialAnchorsAccounts")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}")
- @ExpectedResponses({ 200, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") SpatialAnchorsAccountInner spatialAnchorsAccount,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}")
- @ExpectedResponses({ 200, 201 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") SpatialAnchorsAccountInner spatialAnchorsAccount,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listKeys(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono