diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java deleted file mode 100644 index 6af58a925aaf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ /dev/null @@ -1,599 +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.appcontainers; - -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.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.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; -import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; -import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; -import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsApiClientBuilder; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; -import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesImpl; -import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; -import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; -import com.azure.resourcemanager.appcontainers.models.BillingMeters; -import com.azure.resourcemanager.appcontainers.models.Certificates; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; -import com.azure.resourcemanager.appcontainers.models.ContainerApps; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; -import com.azure.resourcemanager.appcontainers.models.DaprComponents; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; -import com.azure.resourcemanager.appcontainers.models.Namespaces; -import com.azure.resourcemanager.appcontainers.models.Operations; -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 ContainerAppsApiManager. */ -public final class ContainerAppsApiManager { - private ContainerAppsAuthConfigs containerAppsAuthConfigs; - - private ContainerApps containerApps; - - private ContainerAppsRevisions containerAppsRevisions; - - private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; - - private DaprComponents daprComponents; - - private ContainerAppsDiagnostics containerAppsDiagnostics; - - private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; - - private ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics; - - private Operations operations; - - private ManagedEnvironments managedEnvironments; - - private Certificates certificates; - - private Namespaces namespaces; - - private ManagedEnvironmentsStorages managedEnvironmentsStorages; - - private ContainerAppsSourceControls containerAppsSourceControls; - - private ConnectedEnvironments connectedEnvironments; - - private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; - - private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; - - private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; - - private AvailableWorkloadProfiles availableWorkloadProfiles; - - private BillingMeters billingMeters; - - private final ContainerAppsApiClient clientObject; - - private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ContainerAppsApiClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of ContainerAppsApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public static ContainerAppsApiManager 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 ContainerAppsApi service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public static ContainerAppsApiManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ContainerAppsApiManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create ContainerAppsApiManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new ContainerAppsApiManager.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 ContainerAppsApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public ContainerAppsApiManager 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.appcontainers") - .append("/") - .append("1.0.0-beta.4"); - 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 ArmChallengeAuthenticationPolicy(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 ContainerAppsApiManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of ContainerAppsAuthConfigs. It manages AuthConfig. - * - * @return Resource collection API of ContainerAppsAuthConfigs. - */ - public ContainerAppsAuthConfigs containerAppsAuthConfigs() { - if (this.containerAppsAuthConfigs == null) { - this.containerAppsAuthConfigs = - new ContainerAppsAuthConfigsImpl(clientObject.getContainerAppsAuthConfigs(), this); - } - return containerAppsAuthConfigs; - } - - /** - * Gets the resource collection API of ContainerApps. It manages ContainerApp. - * - * @return Resource collection API of ContainerApps. - */ - public ContainerApps containerApps() { - if (this.containerApps == null) { - this.containerApps = new ContainerAppsImpl(clientObject.getContainerApps(), this); - } - return containerApps; - } - - /** - * Gets the resource collection API of ContainerAppsRevisions. - * - * @return Resource collection API of ContainerAppsRevisions. - */ - public ContainerAppsRevisions containerAppsRevisions() { - if (this.containerAppsRevisions == null) { - this.containerAppsRevisions = - new ContainerAppsRevisionsImpl(clientObject.getContainerAppsRevisions(), this); - } - return containerAppsRevisions; - } - - /** - * Gets the resource collection API of ContainerAppsRevisionReplicas. - * - * @return Resource collection API of ContainerAppsRevisionReplicas. - */ - public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { - if (this.containerAppsRevisionReplicas == null) { - this.containerAppsRevisionReplicas = - new ContainerAppsRevisionReplicasImpl(clientObject.getContainerAppsRevisionReplicas(), this); - } - return containerAppsRevisionReplicas; - } - - /** - * Gets the resource collection API of DaprComponents. It manages DaprComponent. - * - * @return Resource collection API of DaprComponents. - */ - public DaprComponents daprComponents() { - if (this.daprComponents == null) { - this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); - } - return daprComponents; - } - - /** - * Gets the resource collection API of ContainerAppsDiagnostics. - * - * @return Resource collection API of ContainerAppsDiagnostics. - */ - public ContainerAppsDiagnostics containerAppsDiagnostics() { - if (this.containerAppsDiagnostics == null) { - this.containerAppsDiagnostics = - new ContainerAppsDiagnosticsImpl(clientObject.getContainerAppsDiagnostics(), this); - } - return containerAppsDiagnostics; - } - - /** - * Gets the resource collection API of ManagedEnvironmentDiagnostics. - * - * @return Resource collection API of ManagedEnvironmentDiagnostics. - */ - public ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics() { - if (this.managedEnvironmentDiagnostics == null) { - this.managedEnvironmentDiagnostics = - new ManagedEnvironmentDiagnosticsImpl(clientObject.getManagedEnvironmentDiagnostics(), this); - } - return managedEnvironmentDiagnostics; - } - - /** - * Gets the resource collection API of ManagedEnvironmentsDiagnostics. - * - * @return Resource collection API of ManagedEnvironmentsDiagnostics. - */ - public ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics() { - if (this.managedEnvironmentsDiagnostics == null) { - this.managedEnvironmentsDiagnostics = - new ManagedEnvironmentsDiagnosticsImpl(clientObject.getManagedEnvironmentsDiagnostics(), this); - } - return managedEnvironmentsDiagnostics; - } - - /** - * 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 ManagedEnvironments. It manages ManagedEnvironment. - * - * @return Resource collection API of ManagedEnvironments. - */ - public ManagedEnvironments managedEnvironments() { - if (this.managedEnvironments == null) { - this.managedEnvironments = new ManagedEnvironmentsImpl(clientObject.getManagedEnvironments(), this); - } - return managedEnvironments; - } - - /** - * Gets the resource collection API of Certificates. It manages Certificate. - * - * @return Resource collection API of Certificates. - */ - public Certificates certificates() { - if (this.certificates == null) { - this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); - } - return certificates; - } - - /** - * Gets the resource collection API of Namespaces. - * - * @return Resource collection API of Namespaces. - */ - public Namespaces namespaces() { - if (this.namespaces == null) { - this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this); - } - return namespaces; - } - - /** - * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. - * - * @return Resource collection API of ManagedEnvironmentsStorages. - */ - public ManagedEnvironmentsStorages managedEnvironmentsStorages() { - if (this.managedEnvironmentsStorages == null) { - this.managedEnvironmentsStorages = - new ManagedEnvironmentsStoragesImpl(clientObject.getManagedEnvironmentsStorages(), this); - } - return managedEnvironmentsStorages; - } - - /** - * Gets the resource collection API of ContainerAppsSourceControls. It manages SourceControl. - * - * @return Resource collection API of ContainerAppsSourceControls. - */ - public ContainerAppsSourceControls containerAppsSourceControls() { - if (this.containerAppsSourceControls == null) { - this.containerAppsSourceControls = - new ContainerAppsSourceControlsImpl(clientObject.getContainerAppsSourceControls(), this); - } - return containerAppsSourceControls; - } - - /** - * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. - * - * @return Resource collection API of ConnectedEnvironments. - */ - public ConnectedEnvironments connectedEnvironments() { - if (this.connectedEnvironments == null) { - this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); - } - return connectedEnvironments; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsCertificates. - * - * @return Resource collection API of ConnectedEnvironmentsCertificates. - */ - public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { - if (this.connectedEnvironmentsCertificates == null) { - this.connectedEnvironmentsCertificates = - new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); - } - return connectedEnvironmentsCertificates; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. - * - * @return Resource collection API of ConnectedEnvironmentsDaprComponents. - */ - public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { - if (this.connectedEnvironmentsDaprComponents == null) { - this.connectedEnvironmentsDaprComponents = - new ConnectedEnvironmentsDaprComponentsImpl( - clientObject.getConnectedEnvironmentsDaprComponents(), this); - } - return connectedEnvironmentsDaprComponents; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. - * - * @return Resource collection API of ConnectedEnvironmentsStorages. - */ - public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { - if (this.connectedEnvironmentsStorages == null) { - this.connectedEnvironmentsStorages = - new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); - } - return connectedEnvironmentsStorages; - } - - /** - * Gets the resource collection API of AvailableWorkloadProfiles. - * - * @return Resource collection API of AvailableWorkloadProfiles. - */ - public AvailableWorkloadProfiles availableWorkloadProfiles() { - if (this.availableWorkloadProfiles == null) { - this.availableWorkloadProfiles = - new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); - } - return availableWorkloadProfiles; - } - - /** - * Gets the resource collection API of BillingMeters. - * - * @return Resource collection API of BillingMeters. - */ - public BillingMeters billingMeters() { - if (this.billingMeters == null) { - this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); - } - return billingMeters; - } - - /** - * @return Wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - */ - public ContainerAppsApiClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java deleted file mode 100644 index 1c4ae5157f86..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java +++ /dev/null @@ -1,43 +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.appcontainers.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.appcontainers.fluent.models.AvailableWorkloadProfileInner; - -/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ -public interface AvailableWorkloadProfilesClient { - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String location); - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String location, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java deleted file mode 100644 index b6877f2b5e11..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.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.appcontainers.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.appcontainers.fluent.models.BillingMeterCollectionInner; - -/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ -public interface BillingMetersClient { - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, Context context); - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BillingMeterCollectionInner get(String location); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java deleted file mode 100644 index 1e66f7dd0665..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java +++ /dev/null @@ -1,190 +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.appcontainers.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.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; - -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ -public interface CertificatesClient { - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner get(String resourceGroupName, String environmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String certificateName, Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String certificateName); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update( - String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java deleted file mode 100644 index 3924eac328c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.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.appcontainers.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.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsCertificatesClient. - */ -public interface ConnectedEnvironmentsCertificatesClient { - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName, Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java deleted file mode 100644 index efa280c81bfa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.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.resourcemanager.appcontainers.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. */ -public interface ConnectedEnvironmentsClient { - /** - * Get all connectedEnvironments for a subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all connectedEnvironments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner update(String resourceGroupName, String connectedEnvironmentName); - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java deleted file mode 100644 index f137979cc9f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.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.appcontainers.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.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. - */ -public interface ConnectedEnvironmentsDaprComponentsClient { - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java deleted file mode 100644 index 2718921f835d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java +++ /dev/null @@ -1,150 +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.appcontainers.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.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; - -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. */ -public interface ConnectedEnvironmentsStoragesClient { - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, String storageName); - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, - Context context); - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName, Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java deleted file mode 100644 index b7f2855529f3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java +++ /dev/null @@ -1,186 +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.appcontainers.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for ContainerAppsApiClient class. */ -public interface ContainerAppsApiClient { - /** - * Gets The ID of the target subscription. - * - * @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 ContainerAppsAuthConfigsClient object to access its operations. - * - * @return the ContainerAppsAuthConfigsClient object. - */ - ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs(); - - /** - * Gets the ContainerAppsClient object to access its operations. - * - * @return the ContainerAppsClient object. - */ - ContainerAppsClient getContainerApps(); - - /** - * Gets the ContainerAppsRevisionsClient object to access its operations. - * - * @return the ContainerAppsRevisionsClient object. - */ - ContainerAppsRevisionsClient getContainerAppsRevisions(); - - /** - * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * - * @return the ContainerAppsRevisionReplicasClient object. - */ - ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - DaprComponentsClient getDaprComponents(); - - /** - * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * - * @return the ContainerAppsDiagnosticsClient object. - */ - ContainerAppsDiagnosticsClient getContainerAppsDiagnostics(); - - /** - * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentDiagnosticsClient object. - */ - ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics(); - - /** - * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentsDiagnosticsClient object. - */ - ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the ManagedEnvironmentsClient object to access its operations. - * - * @return the ManagedEnvironmentsClient object. - */ - ManagedEnvironmentsClient getManagedEnvironments(); - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - CertificatesClient getCertificates(); - - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - NamespacesClient getNamespaces(); - - /** - * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * - * @return the ManagedEnvironmentsStoragesClient object. - */ - ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages(); - - /** - * Gets the ContainerAppsSourceControlsClient object to access its operations. - * - * @return the ContainerAppsSourceControlsClient object. - */ - ContainerAppsSourceControlsClient getContainerAppsSourceControls(); - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - ConnectedEnvironmentsClient getConnectedEnvironments(); - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - BillingMetersClient getBillingMeters(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java deleted file mode 100644 index 9b742d9945c5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java +++ /dev/null @@ -1,148 +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.appcontainers.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.appcontainers.fluent.models.AuthConfigInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. */ -public interface ContainerAppsAuthConfigsClient { - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName); - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context); - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String authConfigName, Context context); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String authConfigName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java deleted file mode 100644 index bf77072df0af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java +++ /dev/null @@ -1,381 +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.appcontainers.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsClient. */ -public interface ContainerAppsClient { - /** - * Get the Container Apps in a given subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get the Container Apps in a given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, Context context); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, Context context); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CustomHostnameAnalysisResultInner listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java deleted file mode 100644 index 661c67a8b56e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java +++ /dev/null @@ -1,168 +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.appcontainers.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.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. */ -public interface ContainerAppsDiagnosticsClient { - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String containerAppName); - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner getRoot(String resourceGroupName, String containerAppName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java deleted file mode 100644 index 79ad30876622..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java +++ /dev/null @@ -1,81 +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.appcontainers.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.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. */ -public interface ContainerAppsRevisionReplicasClient { - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java deleted file mode 100644 index fc706efbed30..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java +++ /dev/null @@ -1,171 +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.appcontainers.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.appcontainers.fluent.models.RevisionInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ -public interface ContainerAppsRevisionsClient { - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 activateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 restartRevision(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java deleted file mode 100644 index 52444e4f6782..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java +++ /dev/null @@ -1,227 +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.appcontainers.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; - -/** An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. */ -public interface ContainerAppsSourceControlsClient { - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java deleted file mode 100644 index 62358a5fc62a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java +++ /dev/null @@ -1,190 +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.appcontainers.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.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; - -/** An instance of this class provides access to all the operations defined in DaprComponentsClient. */ -public interface DaprComponentsClient { - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String environmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String componentName, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, String componentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java deleted file mode 100644 index e42f15fa36a0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java +++ /dev/null @@ -1,86 +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.appcontainers.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.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. */ -public interface ManagedEnvironmentDiagnosticsClient { - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName); - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context); - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java deleted file mode 100644 index 12bb72b96036..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java +++ /dev/null @@ -1,392 +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.appcontainers.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ -public interface ManagedEnvironmentsClient { - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, Context context); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, Context context); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java deleted file mode 100644 index c6580d78fdf5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java +++ /dev/null @@ -1,48 +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.appcontainers.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.appcontainers.fluent.models.ManagedEnvironmentInner; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. */ -public interface ManagedEnvironmentsDiagnosticsClient { - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java deleted file mode 100644 index f4a809933d52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java +++ /dev/null @@ -1,150 +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.appcontainers.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.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. */ -public interface ManagedEnvironmentsStoragesClient { - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName); - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context); - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String storageName, Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String storageName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java deleted file mode 100644 index 27878d6ce998..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java +++ /dev/null @@ -1,55 +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.appcontainers.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.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** An instance of this class provides access to all the operations defined in NamespacesClient. */ -public interface NamespacesClient { - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java deleted file mode 100644 index a9e17d64326e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java +++ /dev/null @@ -1,38 +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.appcontainers.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.appcontainers.fluent.models.OperationDetailInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all of the available RP operations. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available RP operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java deleted file mode 100644 index 7a3c141ee7e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java +++ /dev/null @@ -1,189 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ -@Fluent -public final class AuthConfigInner extends ProxyResource { - /* - * AuthConfig resource specific properties - */ - @JsonProperty(value = "properties") - private AuthConfigProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of AuthConfigInner class. */ - public AuthConfigInner() { - } - - /** - * Get the innerProperties property: AuthConfig resource specific properties. - * - * @return the innerProperties value. - */ - private AuthConfigProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - public AuthPlatform platform() { - return this.innerProperties() == null ? null : this.innerProperties().platform(); - } - - /** - * Set the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @param platform the platform value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withPlatform(AuthPlatform platform) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withPlatform(platform); - return this; - } - - /** - * Get the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - public GlobalValidation globalValidation() { - return this.innerProperties() == null ? null : this.innerProperties().globalValidation(); - } - - /** - * Set the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @param globalValidation the globalValidation value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withGlobalValidation(GlobalValidation globalValidation) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withGlobalValidation(globalValidation); - return this; - } - - /** - * Get the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - public IdentityProviders identityProviders() { - return this.innerProperties() == null ? null : this.innerProperties().identityProviders(); - } - - /** - * Set the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @param identityProviders the identityProviders value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withIdentityProviders(IdentityProviders identityProviders) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withIdentityProviders(identityProviders); - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - public Login login() { - return this.innerProperties() == null ? null : this.innerProperties().login(); - } - - /** - * Set the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @param login the login value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withLogin(Login login) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withLogin(login); - return this; - } - - /** - * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - public HttpSettings httpSettings() { - return this.innerProperties() == null ? null : this.innerProperties().httpSettings(); - } - - /** - * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @param httpSettings the httpSettings value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withHttpSettings(HttpSettings httpSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withHttpSettings(httpSettings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java deleted file mode 100644 index 9562abcf1c1d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java +++ /dev/null @@ -1,187 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AuthConfig resource specific properties. */ -@Fluent -public final class AuthConfigProperties { - /* - * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. - */ - @JsonProperty(value = "platform") - private AuthPlatform platform; - - /* - * The configuration settings that determines the validation flow of users using Service - * Authentication/Authorization. - */ - @JsonProperty(value = "globalValidation") - private GlobalValidation globalValidation; - - /* - * The configuration settings of each of the identity providers used to configure ContainerApp Service - * Authentication/Authorization. - */ - @JsonProperty(value = "identityProviders") - private IdentityProviders identityProviders; - - /* - * The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. - */ - @JsonProperty(value = "login") - private Login login; - - /* - * The configuration settings of the HTTP requests for authentication and authorization requests made against - * ContainerApp Service Authentication/Authorization. - */ - @JsonProperty(value = "httpSettings") - private HttpSettings httpSettings; - - /** Creates an instance of AuthConfigProperties class. */ - public AuthConfigProperties() { - } - - /** - * Get the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - public AuthPlatform platform() { - return this.platform; - } - - /** - * Set the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @param platform the platform value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withPlatform(AuthPlatform platform) { - this.platform = platform; - return this; - } - - /** - * Get the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - public GlobalValidation globalValidation() { - return this.globalValidation; - } - - /** - * Set the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @param globalValidation the globalValidation value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withGlobalValidation(GlobalValidation globalValidation) { - this.globalValidation = globalValidation; - return this; - } - - /** - * Get the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - public IdentityProviders identityProviders() { - return this.identityProviders; - } - - /** - * Set the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @param identityProviders the identityProviders value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withIdentityProviders(IdentityProviders identityProviders) { - this.identityProviders = identityProviders; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - public Login login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @param login the login value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withLogin(Login login) { - this.login = login; - return this; - } - - /** - * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - public HttpSettings httpSettings() { - return this.httpSettings; - } - - /** - * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @param httpSettings the httpSettings value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withHttpSettings(HttpSettings httpSettings) { - this.httpSettings = httpSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (platform() != null) { - platform().validate(); - } - if (globalValidation() != null) { - globalValidation().validate(); - } - if (identityProviders() != null) { - identityProviders().validate(); - } - if (login() != null) { - login().validate(); - } - if (httpSettings() != null) { - httpSettings().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java deleted file mode 100644 index 1982f7c7dde0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A premium workload profile. */ -@Fluent -public final class AvailableWorkloadProfileInner extends ProxyResource { - /* - * Region of the workload profile. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Revision resource specific properties - */ - @JsonProperty(value = "properties") - private AvailableWorkloadProfileProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of AvailableWorkloadProfileInner class. */ - public AvailableWorkloadProfileInner() { - } - - /** - * Get the location property: Region of the workload profile. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region of the workload profile. - * - * @param location the location value to set. - * @return the AvailableWorkloadProfileInner object itself. - */ - public AvailableWorkloadProfileInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - public AvailableWorkloadProfileProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Revision resource specific properties. - * - * @param properties the properties value to set. - * @return the AvailableWorkloadProfileInner object itself. - */ - public AvailableWorkloadProfileInner withProperties(AvailableWorkloadProfileProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java deleted file mode 100644 index 236f663470d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java +++ /dev/null @@ -1,63 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of premium workload billing meters. */ -@Fluent -public final class BillingMeterCollectionInner { - /* - * Collection of billing meters. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of BillingMeterCollectionInner class. */ - public BillingMeterCollectionInner() { - } - - /** - * Get the value property: Collection of billing meters. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of billing meters. - * - * @param value the value value to set. - * @return the BillingMeterCollectionInner object itself. - */ - public BillingMeterCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model BillingMeterCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BillingMeterCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java deleted file mode 100644 index 49d78985bdcb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java +++ /dev/null @@ -1,86 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ -@Fluent -public final class CertificateInner extends Resource { - /* - * Certificate resource specific properties - */ - @JsonProperty(value = "properties") - private CertificateProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of CertificateInner class. */ - public CertificateInner() { - } - - /** - * Get the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - public CertificateProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Certificate resource specific properties. - * - * @param properties the properties value to set. - * @return the CertificateInner object itself. - */ - public CertificateInner withProperties(CertificateProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public CertificateInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public CertificateInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java deleted file mode 100644 index 1d13506867f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java +++ /dev/null @@ -1,103 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The check availability result. */ -@Fluent -public final class CheckNameAvailabilityResponseInner { - /* - * Indicates if the resource name is available. - */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; - - /* - * The reason why the given name is not available. - */ - @JsonProperty(value = "reason") - private CheckNameAvailabilityReason reason; - - /* - * Detailed reason why the given name is available. - */ - @JsonProperty(value = "message") - private String message; - - /** Creates an instance of CheckNameAvailabilityResponseInner class. */ - public CheckNameAvailabilityResponseInner() { - } - - /** - * Get the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable property: Indicates if the resource name is 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: The reason why the given name is not available. - * - * @return the reason value. - */ - public CheckNameAvailabilityReason reason() { - return this.reason; - } - - /** - * Set the reason property: The reason why the given name is not available. - * - * @param reason the reason value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Detailed reason why the given name is available. - * - * @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() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java deleted file mode 100644 index e4892a69f389..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java +++ /dev/null @@ -1,205 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ -@Fluent -public final class ConnectedEnvironmentInner extends Resource { - /* - * The complex type of the extended location. - */ - @JsonProperty(value = "extendedLocation") - private ExtendedLocation extendedLocation; - - /* - * ConnectedEnvironment resource specific properties - */ - @JsonProperty(value = "properties") - private ConnectedEnvironmentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ConnectedEnvironmentInner class. */ - public ConnectedEnvironmentInner() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the innerProperties property: ConnectedEnvironment resource specific properties. - * - * @return the innerProperties value. - */ - private ConnectedEnvironmentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ConnectedEnvironmentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ConnectedEnvironmentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDomain(); - } - - /** - * Get the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.innerProperties() == null ? null : this.innerProperties().staticIp(); - } - - /** - * Set the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp the staticIp value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withStaticIp(String staticIp) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withStaticIp(staticIp); - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIConnectionString(); - } - - /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIConnectionString the daprAIConnectionString value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withDaprAIConnectionString(String daprAIConnectionString) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java deleted file mode 100644 index 28adb95807b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java +++ /dev/null @@ -1,155 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** ConnectedEnvironment resource specific properties. */ -@Fluent -public final class ConnectedEnvironmentProperties { - /* - * Provisioning state of the Kubernetes Environment. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ConnectedEnvironmentProvisioningState provisioningState; - - /* - * Any errors that occurred during deployment or deployment validation - */ - @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) - private String deploymentErrors; - - /* - * Default Domain Name for the cluster - */ - @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) - private String defaultDomain; - - /* - * Static IP of the connectedEnvironment - */ - @JsonProperty(value = "staticIp") - private String staticIp; - - /* - * Application Insights connection string used by Dapr to export Service to Service communication telemetry - */ - @JsonProperty(value = "daprAIConnectionString") - private String daprAIConnectionString; - - /* - * Custom domain configuration for the environment - */ - @JsonProperty(value = "customDomainConfiguration") - private CustomDomainConfiguration customDomainConfiguration; - - /** Creates an instance of ConnectedEnvironmentProperties class. */ - public ConnectedEnvironmentProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.deploymentErrors; - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.defaultDomain; - } - - /** - * Get the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.staticIp; - } - - /** - * Set the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp the staticIp value to set. - * @return the ConnectedEnvironmentProperties object itself. - */ - public ConnectedEnvironmentProperties withStaticIp(String staticIp) { - this.staticIp = staticIp; - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.daprAIConnectionString; - } - - /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIConnectionString the daprAIConnectionString value to set. - * @return the ConnectedEnvironmentProperties object itself. - */ - public ConnectedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) { - this.daprAIConnectionString = daprAIConnectionString; - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.customDomainConfiguration; - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ConnectedEnvironmentProperties object itself. - */ - public ConnectedEnvironmentProperties withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { - this.customDomainConfiguration = customDomainConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainConfiguration() != null) { - customDomainConfiguration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java deleted file mode 100644 index bbbf23cc740d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java +++ /dev/null @@ -1,71 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Storage resource for connectedEnvironment. */ -@Fluent -public final class ConnectedEnvironmentStorageInner extends ProxyResource { - /* - * Storage properties - */ - @JsonProperty(value = "properties") - private ConnectedEnvironmentStorageProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ConnectedEnvironmentStorageInner class. */ - public ConnectedEnvironmentStorageInner() { - } - - /** - * Get the properties property: Storage properties. - * - * @return the properties value. - */ - public ConnectedEnvironmentStorageProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Storage properties. - * - * @param properties the properties value to set. - * @return the ConnectedEnvironmentStorageInner object itself. - */ - public ConnectedEnvironmentStorageInner withProperties(ConnectedEnvironmentStorageProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java deleted file mode 100644 index f3fd1e14bfd0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java +++ /dev/null @@ -1,62 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of Storage for Environments. */ -@Fluent -public final class ConnectedEnvironmentStoragesCollectionInner { - /* - * Collection of storage resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of ConnectedEnvironmentStoragesCollectionInner class. */ - public ConnectedEnvironmentStoragesCollectionInner() { - } - - /** - * Get the value property: Collection of storage resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of storage resources. - * - * @param value the value value to set. - * @return the ConnectedEnvironmentStoragesCollectionInner object itself. - */ - public ConnectedEnvironmentStoragesCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ConnectedEnvironmentStoragesCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentStoragesCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java deleted file mode 100644 index 494939f8f2e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.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.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Container App Auth Token. */ -@Fluent -public final class ContainerAppAuthTokenInner extends Resource { - /* - * Container App auth token resource specific properties - */ - @JsonProperty(value = "properties") - private ContainerAppAuthTokenProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ContainerAppAuthTokenInner class. */ - public ContainerAppAuthTokenInner() { - } - - /** - * Get the innerProperties property: Container App auth token resource specific properties. - * - * @return the innerProperties value. - */ - private ContainerAppAuthTokenProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ContainerAppAuthTokenInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ContainerAppAuthTokenInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.innerProperties() == null ? null : this.innerProperties().token(); - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.innerProperties() == null ? null : this.innerProperties().expires(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java deleted file mode 100644 index 18d85126be08..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java +++ /dev/null @@ -1,55 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Container App auth token resource specific properties. */ -@Immutable -public final class ContainerAppAuthTokenProperties { - /* - * Auth token value. - */ - @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) - private String token; - - /* - * Token expiration date. - */ - @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expires; - - /** Creates an instance of ContainerAppAuthTokenProperties class. */ - public ContainerAppAuthTokenProperties() { - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java deleted file mode 100644 index 0f37c337d055..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ /dev/null @@ -1,310 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Container App. */ -@Fluent -public final class ContainerAppInner extends Resource { - /* - * The complex type of the extended location. - */ - @JsonProperty(value = "extendedLocation") - private ExtendedLocation extendedLocation; - - /* - * managed identities for the Container App to interact with other Azure services without maintaining any secrets - * or credentials in code. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * ContainerApp resource specific properties - */ - @JsonProperty(value = "properties") - private ContainerAppProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ContainerAppInner class. */ - public ContainerAppInner() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the identity property: managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * - * @param identity the identity value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: ContainerApp resource specific properties. - * - * @return the innerProperties value. - */ - private ContainerAppProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ContainerAppInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ContainerAppInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - public ContainerAppProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - public String managedEnvironmentId() { - return this.innerProperties() == null ? null : this.innerProperties().managedEnvironmentId(); - } - - /** - * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @param managedEnvironmentId the managedEnvironmentId value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withManagedEnvironmentId(String managedEnvironmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withManagedEnvironmentId(managedEnvironmentId); - return this; - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Get the workloadProfileType property: Workload profile type to pin for container app execution. - * - * @return the workloadProfileType value. - */ - public String workloadProfileType() { - return this.innerProperties() == null ? null : this.innerProperties().workloadProfileType(); - } - - /** - * Set the workloadProfileType property: Workload profile type to pin for container app execution. - * - * @param workloadProfileType the workloadProfileType value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withWorkloadProfileType(String workloadProfileType) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withWorkloadProfileType(workloadProfileType); - return this; - } - - /** - * Get the latestRevisionName property: Name of the latest revision of the Container App. - * - * @return the latestRevisionName value. - */ - public String latestRevisionName() { - return this.innerProperties() == null ? null : this.innerProperties().latestRevisionName(); - } - - /** - * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - public String latestRevisionFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().latestRevisionFqdn(); - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationId(); - } - - /** - * Get the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - public Configuration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Set the configuration property: Non versioned Container App configuration properties. - * - * @param configuration the configuration value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withConfiguration(Configuration configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withConfiguration(configuration); - return this; - } - - /** - * Get the template property: Container App versioned application definition. - * - * @return the template value. - */ - public Template template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Set the template property: Container App versioned application definition. - * - * @param template the template value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withTemplate(Template template) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withTemplate(template); - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java deleted file mode 100644 index b4f8ae444a42..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ /dev/null @@ -1,254 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** ContainerApp resource specific properties. */ -@Fluent -public final class ContainerAppProperties { - /* - * Provisioning state of the Container App. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ContainerAppProvisioningState provisioningState; - - /* - * Deprecated. Resource ID of the Container App's environment. - */ - @JsonProperty(value = "managedEnvironmentId") - private String managedEnvironmentId; - - /* - * Resource ID of environment. - */ - @JsonProperty(value = "environmentId") - private String environmentId; - - /* - * Workload profile type to pin for container app execution. - */ - @JsonProperty(value = "workloadProfileType") - private String workloadProfileType; - - /* - * Name of the latest revision of the Container App. - */ - @JsonProperty(value = "latestRevisionName", access = JsonProperty.Access.WRITE_ONLY) - private String latestRevisionName; - - /* - * Fully Qualified Domain Name of the latest revision of the Container App. - */ - @JsonProperty(value = "latestRevisionFqdn", access = JsonProperty.Access.WRITE_ONLY) - private String latestRevisionFqdn; - - /* - * Id used to verify domain name ownership - */ - @JsonProperty(value = "customDomainVerificationId", access = JsonProperty.Access.WRITE_ONLY) - private String customDomainVerificationId; - - /* - * Non versioned Container App configuration properties. - */ - @JsonProperty(value = "configuration") - private Configuration configuration; - - /* - * Container App versioned application definition. - */ - @JsonProperty(value = "template") - private Template template; - - /* - * Outbound IP Addresses for container app. - */ - @JsonProperty(value = "outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List outboundIpAddresses; - - /* - * The endpoint of the eventstream of the container app. - */ - @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String eventStreamEndpoint; - - /** Creates an instance of ContainerAppProperties class. */ - public ContainerAppProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - public ContainerAppProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - public String managedEnvironmentId() { - return this.managedEnvironmentId; - } - - /** - * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @param managedEnvironmentId the managedEnvironmentId value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withManagedEnvironmentId(String managedEnvironmentId) { - this.managedEnvironmentId = managedEnvironmentId; - return this; - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the workloadProfileType property: Workload profile type to pin for container app execution. - * - * @return the workloadProfileType value. - */ - public String workloadProfileType() { - return this.workloadProfileType; - } - - /** - * Set the workloadProfileType property: Workload profile type to pin for container app execution. - * - * @param workloadProfileType the workloadProfileType value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withWorkloadProfileType(String workloadProfileType) { - this.workloadProfileType = workloadProfileType; - return this; - } - - /** - * Get the latestRevisionName property: Name of the latest revision of the Container App. - * - * @return the latestRevisionName value. - */ - public String latestRevisionName() { - return this.latestRevisionName; - } - - /** - * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - public String latestRevisionFqdn() { - return this.latestRevisionFqdn; - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.customDomainVerificationId; - } - - /** - * Get the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - public Configuration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Non versioned Container App configuration properties. - * - * @param configuration the configuration value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withConfiguration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the template property: Container App versioned application definition. - * - * @return the template value. - */ - public Template template() { - return this.template; - } - - /** - * Set the template property: Container App versioned application definition. - * - * @param template the template value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withTemplate(Template template) { - this.template = template; - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.outboundIpAddresses; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configuration() != null) { - configuration().validate(); - } - if (template() != null) { - template().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java deleted file mode 100644 index 58e0b8275ae2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ /dev/null @@ -1,271 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Custom domain analysis. */ -@Fluent -public final class CustomHostnameAnalysisResultInner { - /* - * Host name that was analyzed - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * true if hostname is already verified; otherwise, false. - */ - @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isHostnameAlreadyVerified; - - /* - * DNS verification test result. - */ - @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) - private DnsVerificationTestResult customDomainVerificationTest; - - /* - * Raw failure information if DNS verification fails. - */ - @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) - private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; - - /* - * true if there is a conflict on the Container App's managed environment; otherwise, - * false. - */ - @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasConflictOnManagedEnvironment; - - /* - * true if there is a conflict on the Container App's managed environment level custom domain; - * otherwise, false. - */ - @JsonProperty(value = "conflictWithEnvironmentCustomDomain", access = JsonProperty.Access.WRITE_ONLY) - private Boolean conflictWithEnvironmentCustomDomain; - - /* - * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. - */ - @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String conflictingContainerAppResourceId; - - /* - * CName records visible for this hostname. - */ - @JsonProperty(value = "cNameRecords") - private List cNameRecords; - - /* - * TXT records visible for this hostname. - */ - @JsonProperty(value = "txtRecords") - private List txtRecords; - - /* - * A records visible for this hostname. - */ - @JsonProperty(value = "aRecords") - private List aRecords; - - /* - * Alternate CName records visible for this hostname. - */ - @JsonProperty(value = "alternateCNameRecords") - private List alternateCNameRecords; - - /* - * Alternate TXT records visible for this hostname. - */ - @JsonProperty(value = "alternateTxtRecords") - private List alternateTxtRecords; - - /** Creates an instance of CustomHostnameAnalysisResultInner class. */ - public CustomHostnameAnalysisResultInner() { - } - - /** - * Get the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - public Boolean isHostnameAlreadyVerified() { - return this.isHostnameAlreadyVerified; - } - - /** - * Get the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - public DnsVerificationTestResult customDomainVerificationTest() { - return this.customDomainVerificationTest; - } - - /** - * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { - return this.customDomainVerificationFailureInfo; - } - - /** - * Get the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the - * Container App's managed environment; otherwise, <code>false</code>. - * - * @return the hasConflictOnManagedEnvironment value. - */ - public Boolean hasConflictOnManagedEnvironment() { - return this.hasConflictOnManagedEnvironment; - } - - /** - * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on the - * Container App's managed environment level custom domain; otherwise, <code>false</code>. - * - * @return the conflictWithEnvironmentCustomDomain value. - */ - public Boolean conflictWithEnvironmentCustomDomain() { - return this.conflictWithEnvironmentCustomDomain; - } - - /** - * Get the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed - * Environment if it's within the same subscription. - * - * @return the conflictingContainerAppResourceId value. - */ - public String conflictingContainerAppResourceId() { - return this.conflictingContainerAppResourceId; - } - - /** - * Get the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - public List cNameRecords() { - return this.cNameRecords; - } - - /** - * Set the cNameRecords property: CName records visible for this hostname. - * - * @param cNameRecords the cNameRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { - this.cNameRecords = cNameRecords; - return this; - } - - /** - * Get the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - public List txtRecords() { - return this.txtRecords; - } - - /** - * Set the txtRecords property: TXT records visible for this hostname. - * - * @param txtRecords the txtRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { - this.txtRecords = txtRecords; - return this; - } - - /** - * Get the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - public List aRecords() { - return this.aRecords; - } - - /** - * Set the aRecords property: A records visible for this hostname. - * - * @param aRecords the aRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withARecords(List aRecords) { - this.aRecords = aRecords; - return this; - } - - /** - * Get the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - public List alternateCNameRecords() { - return this.alternateCNameRecords; - } - - /** - * Set the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @param alternateCNameRecords the alternateCNameRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { - this.alternateCNameRecords = alternateCNameRecords; - return this; - } - - /** - * Get the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - public List alternateTxtRecords() { - return this.alternateTxtRecords; - } - - /** - * Set the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @param alternateTxtRecords the alternateTxtRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { - this.alternateTxtRecords = alternateTxtRecords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainVerificationFailureInfo() != null) { - customDomainVerificationFailureInfo().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java deleted file mode 100644 index a35ad873e46c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ /dev/null @@ -1,246 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Dapr Component. */ -@Fluent -public final class DaprComponentInner extends ProxyResource { - /* - * Dapr Component resource specific properties - */ - @JsonProperty(value = "properties") - private DaprComponentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of DaprComponentInner class. */ - public DaprComponentInner() { - } - - /** - * Get the innerProperties property: Dapr Component resource specific properties. - * - * @return the innerProperties value. - */ - private DaprComponentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the componentType property: Component type. - * - * @return the componentType value. - */ - public String componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Component type. - * - * @param componentType the componentType value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withComponentType(String componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withComponentType(componentType); - return this; - } - - /** - * Get the version property: Component version. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Component version. - * - * @param version the version value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - public Boolean ignoreErrors() { - return this.innerProperties() == null ? null : this.innerProperties().ignoreErrors(); - } - - /** - * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors the ignoreErrors value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withIgnoreErrors(Boolean ignoreErrors) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withIgnoreErrors(ignoreErrors); - return this; - } - - /** - * Get the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - public String initTimeout() { - return this.innerProperties() == null ? null : this.innerProperties().initTimeout(); - } - - /** - * Set the initTimeout property: Initialization timeout. - * - * @param initTimeout the initTimeout value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withInitTimeout(String initTimeout) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withInitTimeout(initTimeout); - return this; - } - - /** - * Get the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - public List secrets() { - return this.innerProperties() == null ? null : this.innerProperties().secrets(); - } - - /** - * Set the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets the secrets value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withSecrets(List secrets) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withSecrets(secrets); - return this; - } - - /** - * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - public String secretStoreComponent() { - return this.innerProperties() == null ? null : this.innerProperties().secretStoreComponent(); - } - - /** - * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent the secretStoreComponent value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withSecretStoreComponent(String secretStoreComponent) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withSecretStoreComponent(secretStoreComponent); - return this; - } - - /** - * Get the metadata property: Component metadata. - * - * @return the metadata value. - */ - public List metadata() { - return this.innerProperties() == null ? null : this.innerProperties().metadata(); - } - - /** - * Set the metadata property: Component metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withMetadata(List metadata) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withMetadata(metadata); - return this; - } - - /** - * Get the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - public List scopes() { - return this.innerProperties() == null ? null : this.innerProperties().scopes(); - } - - /** - * Set the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes the scopes value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withScopes(List scopes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withScopes(scopes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java deleted file mode 100644 index 5ea576bbf740..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ /dev/null @@ -1,241 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Dapr Component resource specific properties. */ -@Fluent -public final class DaprComponentProperties { - /* - * Component type - */ - @JsonProperty(value = "componentType") - private String componentType; - - /* - * Component version - */ - @JsonProperty(value = "version") - private String version; - - /* - * Boolean describing if the component errors are ignores - */ - @JsonProperty(value = "ignoreErrors") - private Boolean ignoreErrors; - - /* - * Initialization timeout - */ - @JsonProperty(value = "initTimeout") - private String initTimeout; - - /* - * Collection of secrets used by a Dapr component - */ - @JsonProperty(value = "secrets") - private List secrets; - - /* - * Name of a Dapr component to retrieve component secrets from - */ - @JsonProperty(value = "secretStoreComponent") - private String secretStoreComponent; - - /* - * Component metadata - */ - @JsonProperty(value = "metadata") - private List metadata; - - /* - * Names of container apps that can use this Dapr component - */ - @JsonProperty(value = "scopes") - private List scopes; - - /** Creates an instance of DaprComponentProperties class. */ - public DaprComponentProperties() { - } - - /** - * Get the componentType property: Component type. - * - * @return the componentType value. - */ - public String componentType() { - return this.componentType; - } - - /** - * Set the componentType property: Component type. - * - * @param componentType the componentType value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withComponentType(String componentType) { - this.componentType = componentType; - return this; - } - - /** - * Get the version property: Component version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Component version. - * - * @param version the version value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - public Boolean ignoreErrors() { - return this.ignoreErrors; - } - - /** - * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors the ignoreErrors value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withIgnoreErrors(Boolean ignoreErrors) { - this.ignoreErrors = ignoreErrors; - return this; - } - - /** - * Get the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - public String initTimeout() { - return this.initTimeout; - } - - /** - * Set the initTimeout property: Initialization timeout. - * - * @param initTimeout the initTimeout value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withInitTimeout(String initTimeout) { - this.initTimeout = initTimeout; - return this; - } - - /** - * Get the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets the secrets value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - public String secretStoreComponent() { - return this.secretStoreComponent; - } - - /** - * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent the secretStoreComponent value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withSecretStoreComponent(String secretStoreComponent) { - this.secretStoreComponent = secretStoreComponent; - return this; - } - - /** - * Get the metadata property: Component metadata. - * - * @return the metadata value. - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Component metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes the scopes value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (metadata() != null) { - metadata().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java deleted file mode 100644 index 340ba9e1b5ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java +++ /dev/null @@ -1,63 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Dapr component Secrets Collection for ListSecrets Action. */ -@Fluent -public final class DaprSecretsCollectionInner { - /* - * Collection of secrets used by a Dapr component - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of DaprSecretsCollectionInner class. */ - public DaprSecretsCollectionInner() { - } - - /** - * Get the value property: Collection of secrets used by a Dapr component. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of secrets used by a Dapr component. - * - * @param value the value value to set. - * @return the DaprSecretsCollectionInner object itself. - */ - public DaprSecretsCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model DaprSecretsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprSecretsCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java deleted file mode 100644 index 88c3ba58530a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java +++ /dev/null @@ -1,77 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Diagnostics data collection for a resource. */ -@Fluent -public final class DiagnosticsCollectionInner { - /* - * Collection of diagnostic data. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of DiagnosticsCollectionInner class. */ - public DiagnosticsCollectionInner() { - } - - /** - * Get the value property: Collection of diagnostic data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of diagnostic data. - * - * @param value the value value to set. - * @return the DiagnosticsCollectionInner object itself. - */ - public DiagnosticsCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model DiagnosticsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java deleted file mode 100644 index 1c590f86793d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java +++ /dev/null @@ -1,71 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Diagnostics data for a resource. */ -@Fluent -public final class DiagnosticsInner extends ProxyResource { - /* - * Diagnostics resource specific properties - */ - @JsonProperty(value = "properties") - private DiagnosticsProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of DiagnosticsInner class. */ - public DiagnosticsInner() { - } - - /** - * Get the properties property: Diagnostics resource specific properties. - * - * @return the properties value. - */ - public DiagnosticsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Diagnostics resource specific properties. - * - * @param properties the properties value to set. - * @return the DiagnosticsInner object itself. - */ - public DiagnosticsInner withProperties(DiagnosticsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java deleted file mode 100644 index d756ff5d716b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.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.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Environment Auth Token. */ -@Fluent -public final class EnvironmentAuthTokenInner extends Resource { - /* - * Environment auth token resource specific properties - */ - @JsonProperty(value = "properties") - private EnvironmentAuthTokenProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of EnvironmentAuthTokenInner class. */ - public EnvironmentAuthTokenInner() { - } - - /** - * Get the innerProperties property: Environment auth token resource specific properties. - * - * @return the innerProperties value. - */ - private EnvironmentAuthTokenProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentAuthTokenInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentAuthTokenInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.innerProperties() == null ? null : this.innerProperties().token(); - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.innerProperties() == null ? null : this.innerProperties().expires(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java deleted file mode 100644 index 775e90da2e84..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java +++ /dev/null @@ -1,55 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Environment auth token resource specific properties. */ -@Immutable -public final class EnvironmentAuthTokenProperties { - /* - * Auth token value. - */ - @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) - private String token; - - /* - * Token expiration date. - */ - @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expires; - - /** Creates an instance of EnvironmentAuthTokenProperties class. */ - public EnvironmentAuthTokenProperties() { - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java deleted file mode 100644 index a75d12a08e15..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java +++ /dev/null @@ -1,322 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An environment for hosting container apps. */ -@Fluent -public final class ManagedEnvironmentInner extends Resource { - /* - * SKU properties of the Environment. - */ - @JsonProperty(value = "sku") - private EnvironmentSkuProperties sku; - - /* - * Managed environment resource specific properties - */ - @JsonProperty(value = "properties") - private ManagedEnvironmentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ManagedEnvironmentInner class. */ - public ManagedEnvironmentInner() { - } - - /** - * Get the sku property: SKU properties of the Environment. - * - * @return the sku value. - */ - public EnvironmentSkuProperties sku() { - return this.sku; - } - - /** - * Set the sku property: SKU properties of the Environment. - * - * @param sku the sku value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withSku(EnvironmentSkuProperties sku) { - this.sku = sku; - return this; - } - - /** - * Get the innerProperties property: Managed environment resource specific properties. - * - * @return the innerProperties value. - */ - private ManagedEnvironmentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ManagedEnvironmentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedEnvironmentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - public EnvironmentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - public String daprAIInstrumentationKey() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIInstrumentationKey(); - } - - /** - * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withDaprAIInstrumentationKey(daprAIInstrumentationKey); - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIConnectionString(); - } - - /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIConnectionString the daprAIConnectionString value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withDaprAIConnectionString(String daprAIConnectionString) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - /** - * Get the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - public VnetConfiguration vnetConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().vnetConfiguration(); - } - - /** - * Set the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withVnetConfiguration(VnetConfiguration vnetConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withVnetConfiguration(vnetConfiguration); - return this; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDomain(); - } - - /** - * Get the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.innerProperties() == null ? null : this.innerProperties().staticIp(); - } - - /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * - * @return the appLogsConfiguration value. - */ - public AppLogsConfiguration appLogsConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().appLogsConfiguration(); - } - - /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration the appLogsConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withAppLogsConfiguration(appLogsConfiguration); - return this; - } - - /** - * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - public Boolean zoneRedundant() { - return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); - } - - /** - * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @param zoneRedundant the zoneRedundant value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withZoneRedundant(Boolean zoneRedundant) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withZoneRedundant(zoneRedundant); - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); - } - - /** - * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - public List workloadProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().workloadProfiles(); - } - - /** - * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @param workloadProfiles the workloadProfiles value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withWorkloadProfiles(List workloadProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withWorkloadProfiles(workloadProfiles); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java deleted file mode 100644 index 78ef578717a0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.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.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Managed environment resource specific properties. */ -@Fluent -public final class ManagedEnvironmentProperties { - /* - * Provisioning state of the Environment. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private EnvironmentProvisioningState provisioningState; - - /* - * Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry - */ - @JsonProperty(value = "daprAIInstrumentationKey") - private String daprAIInstrumentationKey; - - /* - * Application Insights connection string used by Dapr to export Service to Service communication telemetry - */ - @JsonProperty(value = "daprAIConnectionString") - private String daprAIConnectionString; - - /* - * Vnet configuration for the environment - */ - @JsonProperty(value = "vnetConfiguration") - private VnetConfiguration vnetConfiguration; - - /* - * Any errors that occurred during deployment or deployment validation - */ - @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) - private String deploymentErrors; - - /* - * Default Domain Name for the cluster - */ - @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) - private String defaultDomain; - - /* - * Static IP of the Environment - */ - @JsonProperty(value = "staticIp", access = JsonProperty.Access.WRITE_ONLY) - private String staticIp; - - /* - * Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported - */ - @JsonProperty(value = "appLogsConfiguration") - private AppLogsConfiguration appLogsConfiguration; - - /* - * Whether or not this Managed Environment is zone-redundant. - */ - @JsonProperty(value = "zoneRedundant") - private Boolean zoneRedundant; - - /* - * Custom domain configuration for the environment - */ - @JsonProperty(value = "customDomainConfiguration") - private CustomDomainConfiguration customDomainConfiguration; - - /* - * The endpoint of the eventstream of the Environment. - */ - @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String eventStreamEndpoint; - - /* - * Workload profiles configured for the Managed Environment. - */ - @JsonProperty(value = "workloadProfiles") - private List workloadProfiles; - - /** Creates an instance of ManagedEnvironmentProperties class. */ - public ManagedEnvironmentProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - public EnvironmentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - public String daprAIInstrumentationKey() { - return this.daprAIInstrumentationKey; - } - - /** - * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - this.daprAIInstrumentationKey = daprAIInstrumentationKey; - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.daprAIConnectionString; - } - - /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIConnectionString the daprAIConnectionString value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) { - this.daprAIConnectionString = daprAIConnectionString; - return this; - } - - /** - * Get the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - public VnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withVnetConfiguration(VnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.deploymentErrors; - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.defaultDomain; - } - - /** - * Get the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.staticIp; - } - - /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * - * @return the appLogsConfiguration value. - */ - public AppLogsConfiguration appLogsConfiguration() { - return this.appLogsConfiguration; - } - - /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration the appLogsConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - this.appLogsConfiguration = appLogsConfiguration; - return this; - } - - /** - * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - public Boolean zoneRedundant() { - return this.zoneRedundant; - } - - /** - * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @param zoneRedundant the zoneRedundant value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withZoneRedundant(Boolean zoneRedundant) { - this.zoneRedundant = zoneRedundant; - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.customDomainConfiguration; - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { - this.customDomainConfiguration = customDomainConfiguration; - return this; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - public List workloadProfiles() { - return this.workloadProfiles; - } - - /** - * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @param workloadProfiles the workloadProfiles value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withWorkloadProfiles(List workloadProfiles) { - this.workloadProfiles = workloadProfiles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (appLogsConfiguration() != null) { - appLogsConfiguration().validate(); - } - if (customDomainConfiguration() != null) { - customDomainConfiguration().validate(); - } - if (workloadProfiles() != null) { - workloadProfiles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java deleted file mode 100644 index cf04d189ef98..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java +++ /dev/null @@ -1,71 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Storage resource for managedEnvironment. */ -@Fluent -public final class ManagedEnvironmentStorageInner extends ProxyResource { - /* - * Storage properties - */ - @JsonProperty(value = "properties") - private ManagedEnvironmentStorageProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ManagedEnvironmentStorageInner class. */ - public ManagedEnvironmentStorageInner() { - } - - /** - * Get the properties property: Storage properties. - * - * @return the properties value. - */ - public ManagedEnvironmentStorageProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Storage properties. - * - * @param properties the properties value to set. - * @return the ManagedEnvironmentStorageInner object itself. - */ - public ManagedEnvironmentStorageInner withProperties(ManagedEnvironmentStorageProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java deleted file mode 100644 index 620546ce1064..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java +++ /dev/null @@ -1,62 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of Storage for Environments. */ -@Fluent -public final class ManagedEnvironmentStoragesCollectionInner { - /* - * Collection of storage resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of ManagedEnvironmentStoragesCollectionInner class. */ - public ManagedEnvironmentStoragesCollectionInner() { - } - - /** - * Get the value property: Collection of storage resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of storage resources. - * - * @param value the value value to set. - * @return the ManagedEnvironmentStoragesCollectionInner object itself. - */ - public ManagedEnvironmentStoragesCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ManagedEnvironmentStoragesCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentStoragesCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java deleted file mode 100644 index f4a5897a8ff9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java +++ /dev/null @@ -1,132 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation detail payload. */ -@Fluent -public final class OperationDetailInner { - /* - * Name of the operation - */ - @JsonProperty(value = "name") - private String name; - - /* - * Indicates whether the operation is a data action - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /* - * Display of the operation - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * Origin of the operation - */ - @JsonProperty(value = "origin") - private String origin; - - /** Creates an instance of OperationDetailInner class. */ - public OperationDetailInner() { - } - - /** - * Get the name property: Name of the operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Get the display property: Display of the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display of the operation. - * - * @param display the display value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: Origin of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java deleted file mode 100644 index 89aa52cf18ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java +++ /dev/null @@ -1,61 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App Revision Replicas collection ARM resource. */ -@Fluent -public final class ReplicaCollectionInner { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of ReplicaCollectionInner class. */ - public ReplicaCollectionInner() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the ReplicaCollectionInner object itself. - */ - public ReplicaCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ReplicaCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ReplicaCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java deleted file mode 100644 index 5dfd65482343..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ /dev/null @@ -1,94 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Container App Revision Replica. */ -@Fluent -public final class ReplicaInner extends ProxyResource { - /* - * Replica resource specific properties - */ - @JsonProperty(value = "properties") - private ReplicaProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ReplicaInner class. */ - public ReplicaInner() { - } - - /** - * Get the innerProperties property: Replica resource specific properties. - * - * @return the innerProperties value. - */ - private ReplicaProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.innerProperties() == null ? null : this.innerProperties().createdTime(); - } - - /** - * Get the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - public List containers() { - return this.innerProperties() == null ? null : this.innerProperties().containers(); - } - - /** - * Set the containers property: The containers collection under a replica. - * - * @param containers the containers value to set. - * @return the ReplicaInner object itself. - */ - public ReplicaInner withContainers(List containers) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicaProperties(); - } - this.innerProperties().withContainers(containers); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java deleted file mode 100644 index 1ddc5027cdc9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java +++ /dev/null @@ -1,71 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Replica resource specific properties. */ -@Fluent -public final class ReplicaProperties { - /* - * Timestamp describing when the pod was created by controller - */ - @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTime; - - /* - * The containers collection under a replica. - */ - @JsonProperty(value = "containers") - private List containers; - - /** Creates an instance of ReplicaProperties class. */ - public ReplicaProperties() { - } - - /** - * Get the createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Get the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: The containers collection under a replica. - * - * @param containers the containers value to set. - * @return the ReplicaProperties object itself. - */ - public ReplicaProperties withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java deleted file mode 100644 index b69a3c85c633..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ /dev/null @@ -1,155 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Container App Revision. */ -@Immutable -public final class RevisionInner extends ProxyResource { - /* - * Revision resource specific properties - */ - @JsonProperty(value = "properties") - private RevisionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of RevisionInner class. */ - public RevisionInner() { - } - - /** - * Get the innerProperties property: Revision resource specific properties. - * - * @return the innerProperties value. - */ - private RevisionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the createdTime property: Timestamp describing when the revision was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.innerProperties() == null ? null : this.innerProperties().createdTime(); - } - - /** - * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - public OffsetDateTime lastActiveTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastActiveTime(); - } - - /** - * Get the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.innerProperties() == null ? null : this.innerProperties().fqdn(); - } - - /** - * Get the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * - * @return the template value. - */ - public Template template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Get the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - public Boolean active() { - return this.innerProperties() == null ? null : this.innerProperties().active(); - } - - /** - * Get the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - public Integer replicas() { - return this.innerProperties() == null ? null : this.innerProperties().replicas(); - } - - /** - * Get the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - public Integer trafficWeight() { - return this.innerProperties() == null ? null : this.innerProperties().trafficWeight(); - } - - /** - * Get the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - public String provisioningError() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningError(); - } - - /** - * Get the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - public RevisionHealthState healthState() { - return this.innerProperties() == null ? null : this.innerProperties().healthState(); - } - - /** - * Get the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - public RevisionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java deleted file mode 100644 index a11ef7a98b97..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java +++ /dev/null @@ -1,186 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Revision resource specific properties. */ -@Immutable -public final class RevisionProperties { - /* - * Timestamp describing when the revision was created - * by controller - */ - @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTime; - - /* - * Timestamp describing when the revision was last active. Only meaningful when revision is inactive - */ - @JsonProperty(value = "lastActiveTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastActiveTime; - - /* - * Fully qualified domain name of the revision - */ - @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) - private String fqdn; - - /* - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - @JsonProperty(value = "template", access = JsonProperty.Access.WRITE_ONLY) - private Template template; - - /* - * Boolean describing if the Revision is Active - */ - @JsonProperty(value = "active", access = JsonProperty.Access.WRITE_ONLY) - private Boolean active; - - /* - * Number of pods currently running for this revision - */ - @JsonProperty(value = "replicas", access = JsonProperty.Access.WRITE_ONLY) - private Integer replicas; - - /* - * Traffic weight assigned to this revision - */ - @JsonProperty(value = "trafficWeight", access = JsonProperty.Access.WRITE_ONLY) - private Integer trafficWeight; - - /* - * Optional Field - Platform Error Message - */ - @JsonProperty(value = "provisioningError", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningError; - - /* - * Current health State of the revision - */ - @JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY) - private RevisionHealthState healthState; - - /* - * Current provisioning State of the revision - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private RevisionProvisioningState provisioningState; - - /** Creates an instance of RevisionProperties class. */ - public RevisionProperties() { - } - - /** - * Get the createdTime property: Timestamp describing when the revision was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - public OffsetDateTime lastActiveTime() { - return this.lastActiveTime; - } - - /** - * Get the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * - * @return the template value. - */ - public Template template() { - return this.template; - } - - /** - * Get the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - public Boolean active() { - return this.active; - } - - /** - * Get the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - public Integer replicas() { - return this.replicas; - } - - /** - * Get the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - public Integer trafficWeight() { - return this.trafficWeight; - } - - /** - * Get the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - public String provisioningError() { - return this.provisioningError; - } - - /** - * Get the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - public RevisionHealthState healthState() { - return this.healthState; - } - - /** - * Get the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - public RevisionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (template() != null) { - template().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java deleted file mode 100644 index 4d9eaacf9c0d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java +++ /dev/null @@ -1,62 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App Secrets Collection ARM resource. */ -@Fluent -public final class SecretsCollectionInner { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of SecretsCollectionInner class. */ - public SecretsCollectionInner() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the SecretsCollectionInner object itself. - */ - public SecretsCollectionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SecretsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecretsCollectionInner.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java deleted file mode 100644 index 401141b646ef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java +++ /dev/null @@ -1,141 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App SourceControl. */ -@Fluent -public final class SourceControlInner extends ProxyResource { - /* - * SourceControl resource specific properties - */ - @JsonProperty(value = "properties") - private SourceControlProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of SourceControlInner class. */ - public SourceControlInner() { - } - - /** - * Get the innerProperties property: SourceControl resource specific properties. - * - * @return the innerProperties value. - */ - private SourceControlProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - public SourceControlOperationState operationState() { - return this.innerProperties() == null ? null : this.innerProperties().operationState(); - } - - /** - * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - public String repoUrl() { - return this.innerProperties() == null ? null : this.innerProperties().repoUrl(); - } - - /** - * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @param repoUrl the repoUrl value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepoUrl(String repoUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepoUrl(repoUrl); - return this; - } - - /** - * Get the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - public String branch() { - return this.innerProperties() == null ? null : this.innerProperties().branch(); - } - - /** - * Set the branch property: The branch which will trigger the auto deployment. - * - * @param branch the branch value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withBranch(String branch) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withBranch(branch); - return this; - } - - /** - * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - public GithubActionConfiguration githubActionConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().githubActionConfiguration(); - } - - /** - * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * - * @param githubActionConfiguration the githubActionConfiguration value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withGithubActionConfiguration(githubActionConfiguration); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java deleted file mode 100644 index 94c3efcb7970..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** SourceControl resource specific properties. */ -@Fluent -public final class SourceControlProperties { - /* - * Current provisioning State of the operation - */ - @JsonProperty(value = "operationState", access = JsonProperty.Access.WRITE_ONLY) - private SourceControlOperationState operationState; - - /* - * The repo url which will be integrated to ContainerApp. - */ - @JsonProperty(value = "repoUrl") - private String repoUrl; - - /* - * The branch which will trigger the auto deployment - */ - @JsonProperty(value = "branch") - private String branch; - - /* - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - @JsonProperty(value = "githubActionConfiguration") - private GithubActionConfiguration githubActionConfiguration; - - /** Creates an instance of SourceControlProperties class. */ - public SourceControlProperties() { - } - - /** - * Get the operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - public SourceControlOperationState operationState() { - return this.operationState; - } - - /** - * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - public String repoUrl() { - return this.repoUrl; - } - - /** - * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @param repoUrl the repoUrl value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepoUrl(String repoUrl) { - this.repoUrl = repoUrl; - return this; - } - - /** - * Get the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch property: The branch which will trigger the auto deployment. - * - * @param branch the branch value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - public GithubActionConfiguration githubActionConfiguration() { - return this.githubActionConfiguration; - } - - /** - * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * - * @param githubActionConfiguration the githubActionConfiguration value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - this.githubActionConfiguration = githubActionConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (githubActionConfiguration() != null) { - githubActionConfiguration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java deleted file mode 100644 index 94e932f257de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java +++ /dev/null @@ -1,71 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Collection of all the workload Profile States for a Premium Managed Environment.. */ -@Fluent -public final class WorkloadProfileStatesInner extends ProxyResource { - /* - * Workload Profile resource specific properties. - */ - @JsonProperty(value = "properties") - private WorkloadProfileStatesProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of WorkloadProfileStatesInner class. */ - public WorkloadProfileStatesInner() { - } - - /** - * Get the properties property: Workload Profile resource specific properties. - * - * @return the properties value. - */ - public WorkloadProfileStatesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Workload Profile resource specific properties. - * - * @param properties the properties value to set. - * @return the WorkloadProfileStatesInner object itself. - */ - public WorkloadProfileStatesInner withProperties(WorkloadProfileStatesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java deleted file mode 100644 index a0507c49fad0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ /dev/null @@ -1,6 +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 ContainerAppsApiClient. null. */ -package com.azure.resourcemanager.appcontainers.fluent.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java deleted file mode 100644 index 4d3731d374d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ /dev/null @@ -1,6 +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 ContainerAppsApiClient. null. */ -package com.azure.resourcemanager.appcontainers.fluent; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java deleted file mode 100644 index 9db849c965eb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java +++ /dev/null @@ -1,189 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; - -public final class AuthConfigImpl implements AuthConfig, AuthConfig.Definition, AuthConfig.Update { - private AuthConfigInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AuthPlatform platform() { - return this.innerModel().platform(); - } - - public GlobalValidation globalValidation() { - return this.innerModel().globalValidation(); - } - - public IdentityProviders identityProviders() { - return this.innerModel().identityProviders(); - } - - public Login login() { - return this.innerModel().login(); - } - - public HttpSettings httpSettings() { - return this.innerModel().httpSettings(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AuthConfigInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String authConfigName; - - public AuthConfigImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public AuthConfig create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AuthConfig create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); - return this; - } - - AuthConfigImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new AuthConfigInner(); - this.serviceManager = serviceManager; - this.authConfigName = name; - } - - public AuthConfigImpl update() { - return this; - } - - public AuthConfig apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AuthConfig apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); - return this; - } - - AuthConfigImpl( - AuthConfigInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.authConfigName = Utils.getValueFromIdByName(innerObject.id(), "authConfigs"); - } - - public AuthConfig refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE) - .getValue(); - return this; - } - - public AuthConfig refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, context) - .getValue(); - return this; - } - - public AuthConfigImpl withPlatform(AuthPlatform platform) { - this.innerModel().withPlatform(platform); - return this; - } - - public AuthConfigImpl withGlobalValidation(GlobalValidation globalValidation) { - this.innerModel().withGlobalValidation(globalValidation); - return this; - } - - public AuthConfigImpl withIdentityProviders(IdentityProviders identityProviders) { - this.innerModel().withIdentityProviders(identityProviders); - return this; - } - - public AuthConfigImpl withLogin(Login login) { - this.innerModel().withLogin(login); - return this; - } - - public AuthConfigImpl withHttpSettings(HttpSettings httpSettings) { - this.innerModel().withHttpSettings(httpSettings); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java deleted file mode 100644 index 6426657e43c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java +++ /dev/null @@ -1,55 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; - -public final class AvailableWorkloadProfileImpl implements AvailableWorkloadProfile { - private AvailableWorkloadProfileInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - AvailableWorkloadProfileImpl( - AvailableWorkloadProfileInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = 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 AvailableWorkloadProfileProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AvailableWorkloadProfileInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java deleted file mode 100644 index 8a3a3e3b2b10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java +++ /dev/null @@ -1,332 +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.appcontainers.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.appcontainers.fluent.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ -public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkloadProfilesClient { - /** The proxy service used to perform REST calls. */ - private final AvailableWorkloadProfilesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of AvailableWorkloadProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AvailableWorkloadProfilesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - AvailableWorkloadProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientAvailableWorkloadProfiles to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface AvailableWorkloadProfilesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}" - + "/availableManagedEnvironmentsWorkloadProfileTypes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String location) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - 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())); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String location, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String location) { - return new PagedFlux<>(() -> getSinglePageAsync(location), nextLink -> getNextSinglePageAsync(nextLink)); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String location, Context context) { - return new PagedFlux<>( - () -> getSinglePageAsync(location, context), nextLink -> getNextSinglePageAsync(nextLink, context)); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String location) { - return new PagedIterable<>(getAsync(location)); - } - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String location, Context context) { - return new PagedIterable<>(getAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink 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 collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync(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.getNext(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 - *

The nextLink 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 collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync( - 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 - .getNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java deleted file mode 100644 index 51a0cb9f72df..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.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.appcontainers.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.appcontainers.fluent.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; - -public final class AvailableWorkloadProfilesImpl implements AvailableWorkloadProfiles { - private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesImpl.class); - - private final AvailableWorkloadProfilesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public AvailableWorkloadProfilesImpl( - AvailableWorkloadProfilesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable get(String location) { - PagedIterable inner = this.serviceClient().get(location); - return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); - } - - public PagedIterable get(String location, Context context) { - PagedIterable inner = this.serviceClient().get(location, context); - return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); - } - - private AvailableWorkloadProfilesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java deleted file mode 100644 index 309f306eadbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.util.Collections; -import java.util.List; - -public final class BillingMeterCollectionImpl implements BillingMeterCollection { - private BillingMeterCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - BillingMeterCollectionImpl( - BillingMeterCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public BillingMeterCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java deleted file mode 100644 index 98f328927105..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java +++ /dev/null @@ -1,199 +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.appcontainers.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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ -public final class BillingMetersClientImpl implements BillingMetersClient { - /** The proxy service used to perform REST calls. */ - private final BillingMetersService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BillingMetersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BillingMetersClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(BillingMetersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBillingMeters to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface BillingMetersService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location) { - return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, Context context) { - return getWithResponseAsync(location, context).block(); - } - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BillingMeterCollectionInner get(String location) { - return getWithResponse(location, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java deleted file mode 100644 index 5032c704cca8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java +++ /dev/null @@ -1,59 +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.appcontainers.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.appcontainers.fluent.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import com.azure.resourcemanager.appcontainers.models.BillingMeters; - -public final class BillingMetersImpl implements BillingMeters { - private static final ClientLogger LOGGER = new ClientLogger(BillingMetersImpl.class); - - private final BillingMetersClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BillingMetersImpl( - BillingMetersClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String location, Context context) { - Response inner = this.serviceClient().getWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BillingMeterCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BillingMeterCollection get(String location) { - BillingMeterCollectionInner inner = this.serviceClient().get(location); - if (inner != null) { - return new BillingMeterCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private BillingMetersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java deleted file mode 100644 index 0e95dfc5f011..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java +++ /dev/null @@ -1,201 +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.appcontainers.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import java.util.Collections; -import java.util.Map; - -public final class CertificateImpl implements Certificate, Certificate.Definition, Certificate.Update { - private CertificateInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 CertificateProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CertificateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String certificateName; - - private CertificatePatch updateCertificateEnvelope; - - public CertificateImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public Certificate create() { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Certificate create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), context) - .getValue(); - return this; - } - - CertificateImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new CertificateInner(); - this.serviceManager = serviceManager; - this.certificateName = name; - } - - public CertificateImpl update() { - this.updateCertificateEnvelope = new CertificatePatch(); - return this; - } - - public Certificate apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, Context.NONE) - .getValue(); - return this; - } - - public Certificate apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, context) - .getValue(); - return this; - } - - CertificateImpl( - CertificateInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates"); - } - - public Certificate refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE) - .getValue(); - return this; - } - - public Certificate refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, context) - .getValue(); - return this; - } - - public CertificateImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public CertificateImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public CertificateImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateCertificateEnvelope.withTags(tags); - return this; - } - } - - public CertificateImpl withProperties(CertificateProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java deleted file mode 100644 index b3ab88433a8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java +++ /dev/null @@ -1,1134 +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.appcontainers.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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateCollection; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ -public final class CertificatesClientImpl implements CertificatesClient { - /** The proxy service used to perform REST calls. */ - private final CertificatesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of CertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface CertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/certificates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - 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())); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String certificateName) { - return getWithResponseAsync(resourceGroupName, environmentName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String environmentName, String certificateName) { - return getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE).getValue(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String certificateName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String certificateName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String certificateName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String certificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String certificateName) { - deleteWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponse( - resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java deleted file mode 100644 index 86498b92b8ee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.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.appcontainers.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.appcontainers.fluent.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.Certificates; - -public final class CertificatesImpl implements Certificates { - private static final ClientLogger LOGGER = new ClientLogger(CertificatesImpl.class); - - private final CertificatesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public CertificatesImpl( - CertificatesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, certificateName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate get(String resourceGroupName, String environmentName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, environmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); - } - - public void delete(String resourceGroupName, String environmentName, String certificateName) { - this.serviceClient().delete(resourceGroupName, environmentName, certificateName); - } - - public Certificate getById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, certificateName, context); - } - - private CertificatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public CertificateImpl define(String name) { - return new CertificateImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java deleted file mode 100644 index 59b89b6157c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java +++ /dev/null @@ -1,42 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; - -public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse { - private CheckNameAvailabilityResponseInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - CheckNameAvailabilityResponseImpl( - CheckNameAvailabilityResponseInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public CheckNameAvailabilityReason reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public CheckNameAvailabilityResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java deleted file mode 100644 index 1542491103f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java +++ /dev/null @@ -1,220 +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.appcontainers.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import java.util.Collections; -import java.util.Map; - -public final class ConnectedEnvironmentImpl - implements ConnectedEnvironment, ConnectedEnvironment.Definition, ConnectedEnvironment.Update { - private ConnectedEnvironmentInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); - } - - public String defaultDomain() { - return this.innerModel().defaultDomain(); - } - - public String staticIp() { - return this.innerModel().staticIp(); - } - - public String daprAIConnectionString() { - return this.innerModel().daprAIConnectionString(); - } - - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerModel().customDomainConfiguration(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ConnectedEnvironmentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - public ConnectedEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ConnectedEnvironment create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); - return this; - } - - public ConnectedEnvironment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); - return this; - } - - ConnectedEnvironmentImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ConnectedEnvironmentInner(); - this.serviceManager = serviceManager; - this.connectedEnvironmentName = name; - } - - public ConnectedEnvironmentImpl update() { - return this; - } - - public ConnectedEnvironment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); - return this; - } - - public ConnectedEnvironment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); - return this; - } - - ConnectedEnvironmentImpl( - ConnectedEnvironmentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - } - - public ConnectedEnvironment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) - .getValue(); - return this; - } - - public ConnectedEnvironment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context) - .getValue(); - return this; - } - - public ConnectedEnvironmentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ConnectedEnvironmentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ConnectedEnvironmentImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ConnectedEnvironmentImpl withExtendedLocation(ExtendedLocation extendedLocation) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } - - public ConnectedEnvironmentImpl withStaticIp(String staticIp) { - this.innerModel().withStaticIp(staticIp); - return this; - } - - public ConnectedEnvironmentImpl withDaprAIConnectionString(String daprAIConnectionString) { - this.innerModel().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - public ConnectedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java deleted file mode 100644 index 6b49e3cdead7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; - -public final class ConnectedEnvironmentStorageImpl - implements ConnectedEnvironmentStorage, ConnectedEnvironmentStorage.Definition, ConnectedEnvironmentStorage.Update { - private ConnectedEnvironmentStorageInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ConnectedEnvironmentStorageProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ConnectedEnvironmentStorageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - private String storageName; - - public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment( - String resourceGroupName, String connectedEnvironmentName) { - this.resourceGroupName = resourceGroupName; - this.connectedEnvironmentName = connectedEnvironmentName; - return this; - } - - public ConnectedEnvironmentStorage create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ConnectedEnvironmentStorage create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ConnectedEnvironmentStorageImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ConnectedEnvironmentStorageInner(); - this.serviceManager = serviceManager; - this.storageName = name; - } - - public ConnectedEnvironmentStorageImpl update() { - return this; - } - - public ConnectedEnvironmentStorage apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ConnectedEnvironmentStorage apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ConnectedEnvironmentStorageImpl( - ConnectedEnvironmentStorageInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.storageName = Utils.getValueFromIdByName(innerObject.id(), "storages"); - } - - public ConnectedEnvironmentStorage refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE) - .getValue(); - return this; - } - - public ConnectedEnvironmentStorage refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context) - .getValue(); - return this; - } - - public ConnectedEnvironmentStorageImpl withProperties(ConnectedEnvironmentStorageProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java deleted file mode 100644 index e3f77be64af1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java +++ /dev/null @@ -1,48 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ConnectedEnvironmentStoragesCollectionImpl implements ConnectedEnvironmentStoragesCollection { - private ConnectedEnvironmentStoragesCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ConnectedEnvironmentStoragesCollectionImpl( - ConnectedEnvironmentStoragesCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ConnectedEnvironmentStoragesCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java deleted file mode 100644 index 4b0c4f9f133e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ /dev/null @@ -1,1156 +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.appcontainers.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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateCollection; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsCertificatesClient. - */ -public final class ConnectedEnvironmentsCertificatesClientImpl implements ConnectedEnvironmentsCertificatesClient { - /** The proxy service used to perform REST calls. */ - private final ConnectedEnvironmentsCertificatesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsCertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsCertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsCertificatesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/certificates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - 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())); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE).getValue(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context) - .block(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String certificateName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context) - .block(); - } - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java deleted file mode 100644 index 851e48480365..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java +++ /dev/null @@ -1,156 +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.appcontainers.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.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; - -public final class ConnectedEnvironmentsCertificatesImpl implements ConnectedEnvironmentsCertificates { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsCertificatesImpl.class); - - private final ConnectedEnvironmentsCertificatesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsCertificatesImpl( - ConnectedEnvironmentsCertificatesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - CertificateInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); - } - - public Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - CertificateInner inner = - this - .serviceClient() - .update(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - private ConnectedEnvironmentsCertificatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java deleted file mode 100644 index c19ba549ecf2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java +++ /dev/null @@ -1,1702 +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.appcontainers.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.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. */ -public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironmentsClient { - /** The proxy service used to perform REST calls. */ - private final ConnectedEnvironmentsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ConnectedEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironments to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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.App" - + "/connectedEnvironments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ConnectedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription 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())); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription 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)); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all connectedEnvironments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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())); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String connectedEnvironmentName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - return getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ConnectedEnvironmentInner.class, - ConnectedEnvironmentInner.class, - this.client.getContext()); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ConnectedEnvironmentInner.class, - ConnectedEnvironmentInner.class, - context); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) - .getSyncPoller(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope).block(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { - return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context).block(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String connectedEnvironmentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName).getSyncPoller(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).getSyncPoller(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, Context context) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName) { - deleteAsync(resourceGroupName, connectedEnvironmentName).block(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, Context context) { - deleteAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner update(String resourceGroupName, String connectedEnvironmentName) { - return updateWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context) - .block(); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java deleted file mode 100644 index bb0656b535b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ /dev/null @@ -1,1124 +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.appcontainers.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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. - */ -public final class ConnectedEnvironmentsDaprComponentsClientImpl implements ConnectedEnvironmentsDaprComponentsClient { - /** The proxy service used to perform REST calls. */ - private final ConnectedEnvironmentsDaprComponentsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsDaprComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsDaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsDaprComponentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsDaprComponents to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsDaprComponentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/daprComponents") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - 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())); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context) - .block(); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, Context.NONE) - .getValue(); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String componentName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context) - .block(); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - return listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java deleted file mode 100644 index 14b9d452dbc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java +++ /dev/null @@ -1,154 +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.appcontainers.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.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; - -public final class ConnectedEnvironmentsDaprComponentsImpl implements ConnectedEnvironmentsDaprComponents { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsDaprComponentsImpl.class); - - private final ConnectedEnvironmentsDaprComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsDaprComponentsImpl( - ConnectedEnvironmentsDaprComponentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, componentName); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - DaprComponentInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); - } - - public Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - Response inner = - this - .serviceClient() - .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprSecretsCollection listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - DaprSecretsCollectionInner inner = - this.serviceClient().listSecrets(resourceGroupName, connectedEnvironmentName, componentName); - if (inner != null) { - return new DaprSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private ConnectedEnvironmentsDaprComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java deleted file mode 100644 index 2f185c945d12..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java +++ /dev/null @@ -1,249 +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.appcontainers.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.appcontainers.fluent.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; - -public final class ConnectedEnvironmentsImpl implements ConnectedEnvironments { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsImpl.class); - - private final ConnectedEnvironmentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsImpl( - ConnectedEnvironmentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, Context context) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, context); - } - - public Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().updateWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentInner inner = this.serviceClient().update(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - Response inner = - this - .serviceClient() - .checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = - this - .serviceClient() - .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ConnectedEnvironment getById(String id) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - return this - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - this.delete(resourceGroupName, connectedEnvironmentName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - this.delete(resourceGroupName, connectedEnvironmentName, context); - } - - private ConnectedEnvironmentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ConnectedEnvironmentImpl define(String name) { - return new ConnectedEnvironmentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java deleted file mode 100644 index b74dc46476d2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ /dev/null @@ -1,798 +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.appcontainers.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.PathParam; -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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. */ -public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedEnvironmentsStoragesClient { - /** The proxy service used to perform REST calls. */ - private final ConnectedEnvironmentsStoragesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsStoragesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsStoragesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsStoragesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/storages") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ConnectedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String connectedEnvironmentName) { - return listWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return listWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName) { - return listWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner get( - String resourceGroupName, String connectedEnvironmentName, String storageName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, context) - .block(); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, Context.NONE) - .getValue(); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName) { - 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName, 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 (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 connectedEnvironmentName, String storageName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java deleted file mode 100644 index a6bcb614f45f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java +++ /dev/null @@ -1,221 +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.appcontainers.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.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; - -public final class ConnectedEnvironmentsStoragesImpl implements ConnectedEnvironmentsStorages { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsStoragesImpl.class); - - private final ConnectedEnvironmentsStoragesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsStoragesImpl( - ConnectedEnvironmentsStoragesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ConnectedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentStoragesCollectionInner inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentStoragesCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ConnectedEnvironmentStorageImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironmentStorage get( - String resourceGroupName, String connectedEnvironmentName, String storageName) { - ConnectedEnvironmentStorageInner inner = - this.serviceClient().get(resourceGroupName, connectedEnvironmentName, storageName); - if (inner != null) { - return new ConnectedEnvironmentStorageImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); - } - - public ConnectedEnvironmentStorage getById(String id) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", - id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - - private ConnectedEnvironmentsStoragesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ConnectedEnvironmentStorageImpl define(String name) { - return new ConnectedEnvironmentStorageImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java deleted file mode 100644 index 186b92d42676..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java +++ /dev/null @@ -1,70 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class ContainerAppAuthTokenImpl implements ContainerAppAuthToken { - private ContainerAppAuthTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ContainerAppAuthTokenImpl( - ContainerAppAuthTokenInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public String token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public ContainerAppAuthTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java deleted file mode 100644 index 26f5c8d21376..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ /dev/null @@ -1,295 +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.appcontainers.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.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.SecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ContainerAppImpl implements ContainerApp, ContainerApp.Definition, ContainerApp.Update { - private ContainerAppInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ContainerAppProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String managedEnvironmentId() { - return this.innerModel().managedEnvironmentId(); - } - - public String environmentId() { - return this.innerModel().environmentId(); - } - - public String workloadProfileType() { - return this.innerModel().workloadProfileType(); - } - - public String latestRevisionName() { - return this.innerModel().latestRevisionName(); - } - - public String latestRevisionFqdn() { - return this.innerModel().latestRevisionFqdn(); - } - - public String customDomainVerificationId() { - return this.innerModel().customDomainVerificationId(); - } - - public Configuration configuration() { - return this.innerModel().configuration(); - } - - public Template template() { - return this.innerModel().template(); - } - - public List outboundIpAddresses() { - List inner = this.innerModel().outboundIpAddresses(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String eventStreamEndpoint() { - return this.innerModel().eventStreamEndpoint(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ContainerAppInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - public ContainerAppImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ContainerApp create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); - return this; - } - - public ContainerApp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); - return this; - } - - ContainerAppImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ContainerAppInner(); - this.serviceManager = serviceManager; - this.containerAppName = name; - } - - public ContainerAppImpl update() { - return this; - } - - public ContainerApp apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); - return this; - } - - public ContainerApp apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); - return this; - } - - ContainerAppImpl( - ContainerAppInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); - } - - public ContainerApp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE) - .getValue(); - return this; - } - - public ContainerApp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, context) - .getValue(); - return this; - } - - public Response listCustomHostnameAnalysisWithResponse( - String customHostname, Context context) { - return serviceManager - .containerApps() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); - } - - public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { - return serviceManager.containerApps().listCustomHostnameAnalysis(resourceGroupName, containerAppName); - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.containerApps().listSecretsWithResponse(resourceGroupName, containerAppName, context); - } - - public SecretsCollection listSecrets() { - return serviceManager.containerApps().listSecrets(resourceGroupName, containerAppName); - } - - public Response getAuthTokenWithResponse(Context context) { - return serviceManager.containerApps().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); - } - - public ContainerAppAuthToken getAuthToken() { - return serviceManager.containerApps().getAuthToken(resourceGroupName, containerAppName); - } - - public ContainerAppImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ContainerAppImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ContainerAppImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ContainerAppImpl withExtendedLocation(ExtendedLocation extendedLocation) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } - - public ContainerAppImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { - this.innerModel().withManagedEnvironmentId(managedEnvironmentId); - return this; - } - - public ContainerAppImpl withEnvironmentId(String environmentId) { - this.innerModel().withEnvironmentId(environmentId); - return this; - } - - public ContainerAppImpl withWorkloadProfileType(String workloadProfileType) { - this.innerModel().withWorkloadProfileType(workloadProfileType); - return this; - } - - public ContainerAppImpl withConfiguration(Configuration configuration) { - this.innerModel().withConfiguration(configuration); - return this; - } - - public ContainerAppImpl withTemplate(Template template) { - this.innerModel().withTemplate(template); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java deleted file mode 100644 index a05676414f52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ /dev/null @@ -1,144 +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.appcontainers.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 ContainerAppsApiClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ContainerAppsApiClientImpl.class}) -public final class ContainerAppsApiClientBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder 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 ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder 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 ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder 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 ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder 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 ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of ContainerAppsApiClientImpl with the provided parameters. - * - * @return an instance of ContainerAppsApiClientImpl. - */ - public ContainerAppsApiClientImpl 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(); - ContainerAppsApiClientImpl client = - new ContainerAppsApiClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); - return client; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java deleted file mode 100644 index ae4e2dfa8dc6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ /dev/null @@ -1,556 +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.appcontainers.implementation; - -import com.azure.core.annotation.ServiceClient; -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.appcontainers.fluent.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; -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 ContainerAppsApiClientImpl type. */ -@ServiceClient(builder = ContainerAppsApiClientBuilder.class) -public final class ContainerAppsApiClientImpl implements ContainerAppsApiClient { - /** The ID of the target subscription. */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @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 ContainerAppsAuthConfigsClient object to access its operations. */ - private final ContainerAppsAuthConfigsClient containerAppsAuthConfigs; - - /** - * Gets the ContainerAppsAuthConfigsClient object to access its operations. - * - * @return the ContainerAppsAuthConfigsClient object. - */ - public ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs() { - return this.containerAppsAuthConfigs; - } - - /** The ContainerAppsClient object to access its operations. */ - private final ContainerAppsClient containerApps; - - /** - * Gets the ContainerAppsClient object to access its operations. - * - * @return the ContainerAppsClient object. - */ - public ContainerAppsClient getContainerApps() { - return this.containerApps; - } - - /** The ContainerAppsRevisionsClient object to access its operations. */ - private final ContainerAppsRevisionsClient containerAppsRevisions; - - /** - * Gets the ContainerAppsRevisionsClient object to access its operations. - * - * @return the ContainerAppsRevisionsClient object. - */ - public ContainerAppsRevisionsClient getContainerAppsRevisions() { - return this.containerAppsRevisions; - } - - /** The ContainerAppsRevisionReplicasClient object to access its operations. */ - private final ContainerAppsRevisionReplicasClient containerAppsRevisionReplicas; - - /** - * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * - * @return the ContainerAppsRevisionReplicasClient object. - */ - public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { - return this.containerAppsRevisionReplicas; - } - - /** The DaprComponentsClient object to access its operations. */ - private final DaprComponentsClient daprComponents; - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - public DaprComponentsClient getDaprComponents() { - return this.daprComponents; - } - - /** The ContainerAppsDiagnosticsClient object to access its operations. */ - private final ContainerAppsDiagnosticsClient containerAppsDiagnostics; - - /** - * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * - * @return the ContainerAppsDiagnosticsClient object. - */ - public ContainerAppsDiagnosticsClient getContainerAppsDiagnostics() { - return this.containerAppsDiagnostics; - } - - /** The ManagedEnvironmentDiagnosticsClient object to access its operations. */ - private final ManagedEnvironmentDiagnosticsClient managedEnvironmentDiagnostics; - - /** - * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentDiagnosticsClient object. - */ - public ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics() { - return this.managedEnvironmentDiagnostics; - } - - /** The ManagedEnvironmentsDiagnosticsClient object to access its operations. */ - private final ManagedEnvironmentsDiagnosticsClient managedEnvironmentsDiagnostics; - - /** - * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentsDiagnosticsClient object. - */ - public ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics() { - return this.managedEnvironmentsDiagnostics; - } - - /** 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 ManagedEnvironmentsClient object to access its operations. */ - private final ManagedEnvironmentsClient managedEnvironments; - - /** - * Gets the ManagedEnvironmentsClient object to access its operations. - * - * @return the ManagedEnvironmentsClient object. - */ - public ManagedEnvironmentsClient getManagedEnvironments() { - return this.managedEnvironments; - } - - /** The CertificatesClient object to access its operations. */ - private final CertificatesClient certificates; - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - public CertificatesClient getCertificates() { - return this.certificates; - } - - /** The NamespacesClient object to access its operations. */ - private final NamespacesClient namespaces; - - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - public NamespacesClient getNamespaces() { - return this.namespaces; - } - - /** The ManagedEnvironmentsStoragesClient object to access its operations. */ - private final ManagedEnvironmentsStoragesClient managedEnvironmentsStorages; - - /** - * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * - * @return the ManagedEnvironmentsStoragesClient object. - */ - public ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages() { - return this.managedEnvironmentsStorages; - } - - /** The ContainerAppsSourceControlsClient object to access its operations. */ - private final ContainerAppsSourceControlsClient containerAppsSourceControls; - - /** - * Gets the ContainerAppsSourceControlsClient object to access its operations. - * - * @return the ContainerAppsSourceControlsClient object. - */ - public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { - return this.containerAppsSourceControls; - } - - /** The ConnectedEnvironmentsClient object to access its operations. */ - private final ConnectedEnvironmentsClient connectedEnvironments; - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - public ConnectedEnvironmentsClient getConnectedEnvironments() { - return this.connectedEnvironments; - } - - /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ - private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { - return this.connectedEnvironmentsCertificates; - } - - /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ - private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { - return this.connectedEnvironmentsDaprComponents; - } - - /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ - private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { - return this.connectedEnvironmentsStorages; - } - - /** The AvailableWorkloadProfilesClient object to access its operations. */ - private final AvailableWorkloadProfilesClient availableWorkloadProfiles; - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { - return this.availableWorkloadProfiles; - } - - /** The BillingMetersClient object to access its operations. */ - private final BillingMetersClient billingMeters; - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - public BillingMetersClient getBillingMeters() { - return this.billingMeters; - } - - /** - * Initializes an instance of ContainerAppsApiClient 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 ID of the target subscription. - * @param endpoint server parameter. - */ - ContainerAppsApiClientImpl( - 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 = "2022-06-01-preview"; - this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); - this.containerApps = new ContainerAppsClientImpl(this); - this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); - this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); - this.daprComponents = new DaprComponentsClientImpl(this); - this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); - this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); - this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); - this.certificates = new CertificatesClientImpl(this); - this.namespaces = new NamespacesClientImpl(this); - this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); - this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); - this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); - this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); - this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); - this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); - this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); - this.billingMeters = new BillingMetersClientImpl(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(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(ContainerAppsApiClientImpl.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java deleted file mode 100644 index 7af8a2bde9c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java +++ /dev/null @@ -1,905 +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.appcontainers.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.PathParam; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. */ -public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAuthConfigsClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsAuthConfigsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsAuthConfigsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsAuthConfigsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsAuthConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsAuthConfigs to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsAuthConfigsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/authConfigs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AuthConfigInner authConfigEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - 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())); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, String authConfigName) { - return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName) { - return getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - if (authConfigEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter authConfigEnvelope is required and cannot be null.")); - } else { - authConfigEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - authConfigEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - if (authConfigEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter authConfigEnvelope is required and cannot be null.")); - } else { - authConfigEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - authConfigEnvelope, - accept, - context); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, context) - .block(); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, Context.NONE) - .getValue(); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName 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, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName, Context context) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName) { - deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return authConfig collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync(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.listByContainerAppNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return authConfig collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync( - 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 - .listByContainerAppNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java deleted file mode 100644 index b9c6591e44ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java +++ /dev/null @@ -1,192 +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.appcontainers.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.appcontainers.fluent.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; - -public final class ContainerAppsAuthConfigsImpl implements ContainerAppsAuthConfigs { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsAuthConfigsImpl.class); - - private final ContainerAppsAuthConfigsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsAuthConfigsImpl( - ContainerAppsAuthConfigsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); - } - - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, containerAppName, authConfigName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AuthConfigImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName) { - AuthConfigInner inner = this.serviceClient().get(resourceGroupName, containerAppName, authConfigName); - if (inner != null) { - return new AuthConfigImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); - } - - public void delete(String resourceGroupName, String containerAppName, String authConfigName) { - this.serviceClient().delete(resourceGroupName, containerAppName, authConfigName); - } - - public AuthConfig getById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); - } - - private ContainerAppsAuthConfigsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public AuthConfigImpl define(String name) { - return new AuthConfigImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java deleted file mode 100644 index 0aafa672aee8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java +++ /dev/null @@ -1,2062 +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.appcontainers.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsClient. */ -public final class ContainerAppsClientImpl implements ContainerAppsClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ContainerAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerApps to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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.App/containerApps") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/listCustomHostNameAnalysis") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listCustomHostnameAnalysis( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("customHostname") String customHostname, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/listSecrets") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/getAuthtoken") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAuthToken( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Container Apps in a given subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription 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())); - } - - /** - * Get the Container Apps in a given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription 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)); - } - - /** - * Get the Container Apps in a given subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container Apps in a given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Container Apps in a given subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get the Container Apps in a given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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())); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName 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, - containerAppName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String containerAppName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName) { - return getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppInner.class, - ContainerAppInner.class, - this.client.getContext()); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .getSyncPoller(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName 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, - containerAppName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName) { - return beginDeleteAsync(resourceGroupName, containerAppName).getSyncPoller(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, context).getSyncPoller(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName) { - return beginDeleteAsync(resourceGroupName, containerAppName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName) { - deleteAsync(resourceGroupName, containerAppName).block(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, Context context) { - deleteAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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>> updateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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>> updateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).getSyncPoller(); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 updateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 updateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); - } - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCustomHostnameAnalysisWithResponseAsync( - String resourceGroupName, String containerAppName, String customHostname) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listCustomHostnameAnalysis( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - customHostname, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCustomHostnameAnalysisWithResponseAsync( - String resourceGroupName, String containerAppName, String customHostname, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listCustomHostnameAnalysis( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - customHostname, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCustomHostnameAnalysisAsync( - String resourceGroupName, String containerAppName) { - final String customHostname = null; - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname, context) - .block(); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis( - String resourceGroupName, String containerAppName) { - final String customHostname = null; - return listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, Context.NONE) - .getValue(); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String containerAppName) { - return listSecretsWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName) { - return listSecretsWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAuthTokenAsync(String resourceGroupName, String containerAppName) { - return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context) { - return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName) { - return getAuthTokenWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java deleted file mode 100644 index fa0c2d32eb4a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java +++ /dev/null @@ -1,1169 +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.appcontainers.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.appcontainers.fluent.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. */ -public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDiagnosticsClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsDiagnosticsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsDiagnosticsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsDiagnostics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/detectors") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/detectors/{detectorName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/detectorProperties/revisionsApi/revisions/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/detectorProperties/rootApi/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getRoot( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectorsNext( - @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(DefaultErrorResponseErrorException.class) - Mono> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - 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())); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listDetectorsNextSinglePageAsync(nextLink)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors( - String resourceGroupName, String containerAppName, Context context) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String containerAppName, String detectorName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - detectorName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String containerAppName, String detectorName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - detectorName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync( - String resourceGroupName, String containerAppName, String detectorName) { - return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName, context).block(); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName) { - return getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, Context.NONE).getValue(); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - 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 Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), - nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync( - String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRootAsync(String resourceGroupName, String containerAppName) { - return getRootWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse( - String resourceGroupName, String containerAppName, Context context) { - return getRootWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner getRoot(String resourceGroupName, String containerAppName) { - return getRootWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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 - .listDetectorsNext(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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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 - .listRevisionsNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java deleted file mode 100644 index e640a600068b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.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.appcontainers.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.appcontainers.fluent.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.Revision; - -public final class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsDiagnosticsImpl.class); - - private final ContainerAppsDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsDiagnosticsImpl( - ContainerAppsDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public PagedIterable listDetectors( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listDetectors(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context) { - Response inner = - this.serviceClient().getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DiagnosticsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName) { - DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, containerAppName, detectorName); - if (inner != null) { - return new DiagnosticsImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RevisionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Revision getRevision(String resourceGroupName, String containerAppName, String revisionName) { - RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new RevisionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getRootWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getRootWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ContainerAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerApp getRoot(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().getRoot(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - private ContainerAppsDiagnosticsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java deleted file mode 100644 index 10d93f3c80fc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java +++ /dev/null @@ -1,260 +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.appcontainers.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.appcontainers.fluent.ContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import com.azure.resourcemanager.appcontainers.models.ContainerApps; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.SecretsCollection; - -public final class ContainerAppsImpl implements ContainerApps { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsImpl.class); - - private final ContainerAppsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsImpl( - ContainerAppsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ContainerAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String containerAppName) { - this.serviceClient().delete(resourceGroupName, containerAppName); - } - - public void delete(String resourceGroupName, String containerAppName, Context context) { - this.serviceClient().delete(resourceGroupName, containerAppName, context); - } - - public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope); - } - - public void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope, context); - } - - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { - Response inner = - this - .serviceClient() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName) { - CustomHostnameAnalysisResultInner inner = - this.serviceClient().listCustomHostnameAnalysis(resourceGroupName, containerAppName); - if (inner != null) { - return new CustomHostnameAnalysisResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SecretsCollection listSecrets(String resourceGroupName, String containerAppName) { - SecretsCollectionInner inner = this.serviceClient().listSecrets(resourceGroupName, containerAppName); - if (inner != null) { - return new SecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ContainerAppAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName) { - ContainerAppAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp getById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - this.delete(resourceGroupName, containerAppName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - this.delete(resourceGroupName, containerAppName, context); - } - - private ContainerAppsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ContainerAppImpl define(String name) { - return new ContainerAppImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java deleted file mode 100644 index 6b7ce6545dd6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ /dev/null @@ -1,428 +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.appcontainers.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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. */ -public final class ContainerAppsRevisionReplicasClientImpl implements ContainerAppsRevisionReplicasClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsRevisionReplicasService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsRevisionReplicasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsRevisionReplicasClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ContainerAppsRevisionReplicasService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionReplicasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getReplica( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @PathParam("replicaName") String replicaName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}/replicas") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listReplicas( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - if (replicaName == null) { - return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getReplica( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - replicaName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - if (replicaName == null) { - return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getReplica( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - replicaName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getReplicaAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { - return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName, context) - .block(); - } - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - return getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, Context.NONE) - .getValue(); - } - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listReplicas( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listReplicas( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listReplicasAsync( - String resourceGroupName, String containerAppName, String revisionName) { - return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - return listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java deleted file mode 100644 index 37db2d255db5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java +++ /dev/null @@ -1,92 +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.appcontainers.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.appcontainers.fluent.ContainerAppsRevisionReplicasClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; - -public final class ContainerAppsRevisionReplicasImpl implements ContainerAppsRevisionReplicas { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsRevisionReplicasImpl.class); - - private final ContainerAppsRevisionReplicasClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsRevisionReplicasImpl( - ContainerAppsRevisionReplicasClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { - Response inner = - this - .serviceClient() - .getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ReplicaImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Replica getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - ReplicaInner inner = - this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); - if (inner != null) { - return new ReplicaImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ReplicaCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - ReplicaCollectionInner inner = - this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new ReplicaCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private ContainerAppsRevisionReplicasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java deleted file mode 100644 index eb37e3d57d3a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java +++ /dev/null @@ -1,1063 +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.appcontainers.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.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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ -public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevisionsClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsRevisionsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsRevisionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsRevisionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}/activate") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> activateRevision( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}/deactivate") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> deactivateRevision( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/revisions/{revisionName}/restart") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> restartRevision( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - 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 Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), - nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync( - String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> activateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .activateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> activateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .activateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 activateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> deactivateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deactivateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> deactivateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deactivateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 deactivateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> restartRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .restartRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> restartRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .restartRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 restartRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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 - .listRevisionsNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java deleted file mode 100644 index 8c4c17319b32..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java +++ /dev/null @@ -1,107 +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.appcontainers.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.appcontainers.fluent.ContainerAppsRevisionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; -import com.azure.resourcemanager.appcontainers.models.Revision; - -public final class ContainerAppsRevisionsImpl implements ContainerAppsRevisions { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsRevisionsImpl.class); - - private final ContainerAppsRevisionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsRevisionsImpl( - ContainerAppsRevisionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RevisionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Revision getRevision(String resourceGroupName, String containerAppName, String revisionName) { - RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new RevisionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().activateRevision(resourceGroupName, containerAppName, revisionName); - } - - public Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, revisionName); - } - - public Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().restartRevision(resourceGroupName, containerAppName, revisionName); - } - - private ContainerAppsRevisionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java deleted file mode 100644 index 2d24f2d839e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ /dev/null @@ -1,1158 +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.appcontainers.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.PathParam; -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.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. */ -public final class ContainerAppsSourceControlsClientImpl implements ContainerAppsSourceControlsClient { - /** The proxy service used to perform REST calls. */ - private final ContainerAppsSourceControlsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsSourceControlsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsSourceControlsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ContainerAppsSourceControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsSourceControls to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsSourceControlsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/sourcecontrols") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SourceControlInner sourceControlEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" - + "/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - 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())); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { - return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName) { - return getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - if (sourceControlEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlEnvelope is required and cannot be null.")); - } else { - sourceControlEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - sourceControlEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - if (sourceControlEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlEnvelope is required and cannot be null.")); - } else { - sourceControlEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - sourceControlEnvelope, - accept, - context); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SourceControlInner.class, - SourceControlInner.class, - this.client.getContext()); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SourceControlInner.class, SourceControlInner.class, context); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) - .getSyncPoller(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .getSyncPoller(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { - return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) - .block(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return createOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .block(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName 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, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).getSyncPoller(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).getSyncPoller(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName) { - deleteAsync(resourceGroupName, containerAppName, sourceControlName).block(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, Context context) { - deleteAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync(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.listByContainerAppNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync( - 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 - .listByContainerAppNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java deleted file mode 100644 index c4b25c702c74..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.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.appcontainers.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.appcontainers.fluent.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; -import com.azure.resourcemanager.appcontainers.models.SourceControl; - -public final class ContainerAppsSourceControlsImpl implements ContainerAppsSourceControls { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsSourceControlsImpl.class); - - private final ContainerAppsSourceControlsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsSourceControlsImpl( - ContainerAppsSourceControlsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); - } - - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SourceControlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, containerAppName, sourceControlName); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String containerAppName, String sourceControlName) { - this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName); - } - - public void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName, context); - } - - public SourceControl getById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - this.delete(resourceGroupName, containerAppName, sourceControlName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 containerAppName = Utils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - this.delete(resourceGroupName, containerAppName, sourceControlName, context); - } - - private ContainerAppsSourceControlsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public SourceControlImpl define(String name) { - return new SourceControlImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java deleted file mode 100644 index 294b901837f9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java +++ /dev/null @@ -1,106 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import java.util.Collections; -import java.util.List; - -public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAnalysisResult { - private CustomHostnameAnalysisResultInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - CustomHostnameAnalysisResultImpl( - CustomHostnameAnalysisResultInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String hostname() { - return this.innerModel().hostname(); - } - - public Boolean isHostnameAlreadyVerified() { - return this.innerModel().isHostnameAlreadyVerified(); - } - - public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerModel().customDomainVerificationTest(); - } - - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { - return this.innerModel().customDomainVerificationFailureInfo(); - } - - public Boolean hasConflictOnManagedEnvironment() { - return this.innerModel().hasConflictOnManagedEnvironment(); - } - - public Boolean conflictWithEnvironmentCustomDomain() { - return this.innerModel().conflictWithEnvironmentCustomDomain(); - } - - public String conflictingContainerAppResourceId() { - return this.innerModel().conflictingContainerAppResourceId(); - } - - public List cNameRecords() { - List inner = this.innerModel().cNameRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List txtRecords() { - List inner = this.innerModel().txtRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List aRecords() { - List inner = this.innerModel().aRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List alternateCNameRecords() { - List inner = this.innerModel().alternateCNameRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List alternateTxtRecords() { - List inner = this.innerModel().alternateTxtRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public CustomHostnameAnalysisResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java deleted file mode 100644 index 0585f315609e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ /dev/null @@ -1,243 +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.appcontainers.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Collections; -import java.util.List; - -public final class DaprComponentImpl implements DaprComponent, DaprComponent.Definition, DaprComponent.Update { - private DaprComponentInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String componentType() { - return this.innerModel().componentType(); - } - - public String version() { - return this.innerModel().version(); - } - - public Boolean ignoreErrors() { - return this.innerModel().ignoreErrors(); - } - - public String initTimeout() { - return this.innerModel().initTimeout(); - } - - public List secrets() { - List inner = this.innerModel().secrets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String secretStoreComponent() { - return this.innerModel().secretStoreComponent(); - } - - public List metadata() { - List inner = this.innerModel().metadata(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List scopes() { - List inner = this.innerModel().scopes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String componentName; - - public DaprComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public DaprComponent create() { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DaprComponent create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) - .getValue(); - return this; - } - - DaprComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprComponentInner(); - this.serviceManager = serviceManager; - this.componentName = name; - } - - public DaprComponentImpl update() { - return this; - } - - public DaprComponent apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DaprComponent apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) - .getValue(); - return this; - } - - DaprComponentImpl( - DaprComponentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.componentName = Utils.getValueFromIdByName(innerObject.id(), "daprComponents"); - } - - public DaprComponent refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE) - .getValue(); - return this; - } - - public DaprComponent refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, context) - .getValue(); - return this; - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager - .daprComponents() - .listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); - } - - public DaprSecretsCollection listSecrets() { - return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); - } - - public DaprComponentImpl withComponentType(String componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public DaprComponentImpl withVersion(String version) { - this.innerModel().withVersion(version); - return this; - } - - public DaprComponentImpl withIgnoreErrors(Boolean ignoreErrors) { - this.innerModel().withIgnoreErrors(ignoreErrors); - return this; - } - - public DaprComponentImpl withInitTimeout(String initTimeout) { - this.innerModel().withInitTimeout(initTimeout); - return this; - } - - public DaprComponentImpl withSecrets(List secrets) { - this.innerModel().withSecrets(secrets); - return this; - } - - public DaprComponentImpl withSecretStoreComponent(String secretStoreComponent) { - this.innerModel().withSecretStoreComponent(secretStoreComponent); - return this; - } - - public DaprComponentImpl withMetadata(List metadata) { - this.innerModel().withMetadata(metadata); - return this; - } - - public DaprComponentImpl withScopes(List scopes) { - this.innerModel().withScopes(scopes); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java deleted file mode 100644 index 17ea587bad67..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java +++ /dev/null @@ -1,1102 +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.appcontainers.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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DaprComponentsClient. */ -public final class DaprComponentsClientImpl implements DaprComponentsClient { - /** The proxy service used to perform REST calls. */ - private final DaprComponentsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(DaprComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprComponents to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface DaprComponentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/daprComponents") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - 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())); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String componentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String componentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String componentName) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String environmentName, String componentName) { - return getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, componentName, daprComponentEnvelope, context) - .block(); - } - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, daprComponentEnvelope, Context.NONE) - .getValue(); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName) { - deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String environmentName, String componentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String environmentName, String componentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync( - String resourceGroupName, String environmentName, String componentName) { - return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String environmentName, String componentName) { - return listSecretsWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM resource 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java deleted file mode 100644 index 0be16fce3137..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ /dev/null @@ -1,229 +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.appcontainers.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.appcontainers.fluent.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; - -public final class DaprComponentsImpl implements DaprComponents { - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentsImpl.class); - - private final DaprComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprComponentsImpl( - DaprComponentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent get(String resourceGroupName, String environmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); - } - - public void delete(String resourceGroupName, String environmentName, String componentName) { - this.serviceClient().delete(resourceGroupName, environmentName, componentName); - } - - public Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) { - DaprSecretsCollectionInner inner = - this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public DaprComponent getById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, componentName, context); - } - - private DaprComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprComponentImpl define(String name) { - return new DaprComponentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java deleted file mode 100644 index e515816a4cfb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Collections; -import java.util.List; - -public final class DaprSecretsCollectionImpl implements DaprSecretsCollection { - private DaprSecretsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DaprSecretsCollectionImpl( - DaprSecretsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public DaprSecretsCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java deleted file mode 100644 index 89edd269aaad..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.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.resourcemanager.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class DiagnosticsCollectionImpl implements DiagnosticsCollection { - private DiagnosticsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DiagnosticsCollectionImpl( - DiagnosticsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new DiagnosticsImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public DiagnosticsCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java deleted file mode 100644 index 593d62d7018a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; - -public final class DiagnosticsImpl implements Diagnostics { - private DiagnosticsInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DiagnosticsImpl( - DiagnosticsInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DiagnosticsProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DiagnosticsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java deleted file mode 100644 index c2a56e6d8305..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java +++ /dev/null @@ -1,70 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class EnvironmentAuthTokenImpl implements EnvironmentAuthToken { - private EnvironmentAuthTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - EnvironmentAuthTokenImpl( - EnvironmentAuthTokenInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public String token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public EnvironmentAuthTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java deleted file mode 100644 index 0ece0ae0eada..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java +++ /dev/null @@ -1,419 +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.appcontainers.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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. */ -public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnvironmentDiagnosticsClient { - /** The proxy service used to perform REST calls. */ - private final ManagedEnvironmentDiagnosticsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentDiagnosticsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/detectors") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/detectors/{detectorName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listDetectorsAsync(String resourceGroupName, String environmentName) { - return listDetectorsWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context) { - return listDetectorsWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName) { - return listDetectorsWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String environmentName, String detectorName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - detectorName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String environmentName, String detectorName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - detectorName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync( - String resourceGroupName, String environmentName, String detectorName) { - return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName, context).block(); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName) { - return getDetectorWithResponse(resourceGroupName, environmentName, detectorName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java deleted file mode 100644 index 6ab273c40556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java +++ /dev/null @@ -1,87 +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.appcontainers.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.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; - -public final class ManagedEnvironmentDiagnosticsImpl implements ManagedEnvironmentDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentDiagnosticsImpl.class); - - private final ManagedEnvironmentDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentDiagnosticsImpl( - ManagedEnvironmentDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().listDetectorsWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DiagnosticsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName) { - DiagnosticsCollectionInner inner = this.serviceClient().listDetectors(resourceGroupName, environmentName); - if (inner != null) { - return new DiagnosticsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context) { - Response inner = - this.serviceClient().getDetectorWithResponse(resourceGroupName, environmentName, detectorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DiagnosticsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName) { - DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, environmentName, detectorName); - if (inner != null) { - return new DiagnosticsImpl(inner, this.manager()); - } else { - return null; - } - } - - private ManagedEnvironmentDiagnosticsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java deleted file mode 100644 index 9304a629fcf5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ /dev/null @@ -1,285 +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.appcontainers.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.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ManagedEnvironmentImpl - implements ManagedEnvironment, ManagedEnvironment.Definition, ManagedEnvironment.Update { - private ManagedEnvironmentInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 EnvironmentSkuProperties sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EnvironmentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String daprAIInstrumentationKey() { - return this.innerModel().daprAIInstrumentationKey(); - } - - public String daprAIConnectionString() { - return this.innerModel().daprAIConnectionString(); - } - - public VnetConfiguration vnetConfiguration() { - return this.innerModel().vnetConfiguration(); - } - - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); - } - - public String defaultDomain() { - return this.innerModel().defaultDomain(); - } - - public String staticIp() { - return this.innerModel().staticIp(); - } - - public AppLogsConfiguration appLogsConfiguration() { - return this.innerModel().appLogsConfiguration(); - } - - public Boolean zoneRedundant() { - return this.innerModel().zoneRedundant(); - } - - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerModel().customDomainConfiguration(); - } - - public String eventStreamEndpoint() { - return this.innerModel().eventStreamEndpoint(); - } - - public List workloadProfiles() { - List inner = this.innerModel().workloadProfiles(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedEnvironmentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - public ManagedEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ManagedEnvironment create() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); - return this; - } - - public ManagedEnvironment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); - return this; - } - - ManagedEnvironmentImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ManagedEnvironmentInner(); - this.serviceManager = serviceManager; - this.environmentName = name; - } - - public ManagedEnvironmentImpl update() { - return this; - } - - public ManagedEnvironment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); - return this; - } - - public ManagedEnvironment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); - return this; - } - - ManagedEnvironmentImpl( - ManagedEnvironmentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - } - - public ManagedEnvironment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE) - .getValue(); - return this; - } - - public ManagedEnvironment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, context) - .getValue(); - return this; - } - - public Response getAuthTokenWithResponse(Context context) { - return serviceManager - .managedEnvironments() - .getAuthTokenWithResponse(resourceGroupName, environmentName, context); - } - - public EnvironmentAuthToken getAuthToken() { - return serviceManager.managedEnvironments().getAuthToken(resourceGroupName, environmentName); - } - - public ManagedEnvironmentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ManagedEnvironmentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ManagedEnvironmentImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ManagedEnvironmentImpl withSku(EnvironmentSkuProperties sku) { - this.innerModel().withSku(sku); - return this; - } - - public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); - return this; - } - - public ManagedEnvironmentImpl withDaprAIConnectionString(String daprAIConnectionString) { - this.innerModel().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - public ManagedEnvironmentImpl withVnetConfiguration(VnetConfiguration vnetConfiguration) { - this.innerModel().withVnetConfiguration(vnetConfiguration); - return this; - } - - public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - this.innerModel().withAppLogsConfiguration(appLogsConfiguration); - return this; - } - - public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { - this.innerModel().withZoneRedundant(zoneRedundant); - return this; - } - - public ManagedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - public ManagedEnvironmentImpl withWorkloadProfiles(List workloadProfiles) { - this.innerModel().withWorkloadProfiles(workloadProfiles); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java deleted file mode 100644 index 06812b119670..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java +++ /dev/null @@ -1,151 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; - -public final class ManagedEnvironmentStorageImpl - implements ManagedEnvironmentStorage, ManagedEnvironmentStorage.Definition, ManagedEnvironmentStorage.Update { - private ManagedEnvironmentStorageInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ManagedEnvironmentStorageProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedEnvironmentStorageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String storageName; - - public ManagedEnvironmentStorageImpl withExistingManagedEnvironment( - String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public ManagedEnvironmentStorage create() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ManagedEnvironmentStorage create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ManagedEnvironmentStorageImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ManagedEnvironmentStorageInner(); - this.serviceManager = serviceManager; - this.storageName = name; - } - - public ManagedEnvironmentStorageImpl update() { - return this; - } - - public ManagedEnvironmentStorage apply() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ManagedEnvironmentStorage apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ManagedEnvironmentStorageImpl( - ManagedEnvironmentStorageInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.storageName = Utils.getValueFromIdByName(innerObject.id(), "storages"); - } - - public ManagedEnvironmentStorage refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE) - .getValue(); - return this; - } - - public ManagedEnvironmentStorage refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, context) - .getValue(); - return this; - } - - public ManagedEnvironmentStorageImpl withProperties(ManagedEnvironmentStorageProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java deleted file mode 100644 index 6fa6eecef739..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java +++ /dev/null @@ -1,48 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStoragesCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ManagedEnvironmentStoragesCollectionImpl implements ManagedEnvironmentStoragesCollection { - private ManagedEnvironmentStoragesCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ManagedEnvironmentStoragesCollectionImpl( - ManagedEnvironmentStoragesCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ManagedEnvironmentStoragesCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java deleted file mode 100644 index 2eeb567c9132..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java +++ /dev/null @@ -1,2154 +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.appcontainers.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.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ -public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsClient { - /** The proxy service used to perform REST calls. */ - private final ManagedEnvironmentsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ManagedEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironments to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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.App" - + "/managedEnvironments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/getAuthtoken") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getAuthToken( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/workloadProfileStates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkloadProfileStates( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("environmentName") String environmentName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroupNext( - @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(DefaultErrorResponseErrorException.class) - Mono> listWorkloadProfileStatesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription 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())); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription 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)); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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())); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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)); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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)); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String environmentName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName) { - return getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - context); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); - } - - /** - * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String environmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName) { - return beginDeleteAsync(resourceGroupName, environmentName).getSyncPoller(); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String environmentName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, context).getSyncPoller(); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName) { - return beginDeleteAsync(resourceGroupName, environmentName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName) { - deleteAsync(resourceGroupName, environmentName).block(); - } - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, Context context) { - deleteAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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>> updateWithResponseAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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>> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).getSyncPoller(); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 updateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 updateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); - } - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 update( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); - } - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAuthTokenAsync(String resourceGroupName, String environmentName) { - return getAuthTokenWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context) { - return getAuthTokenWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName) { - return getAuthTokenWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesSinglePageAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listWorkloadProfileStates( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - environmentName, - 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 all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesSinglePageAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listWorkloadProfileStates( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - environmentName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync( - String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink)); - } - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync( - String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName) { - return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName)); - } - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Environments 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Environments 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Environments 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Environments 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesNextSinglePageAsync( - 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.listWorkloadProfileStatesNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesNextSinglePageAsync( - 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 - .listWorkloadProfileStatesNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java deleted file mode 100644 index 208603d33220..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java +++ /dev/null @@ -1,230 +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.appcontainers.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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. */ -public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEnvironmentsDiagnosticsClient { - /** The proxy service used to perform REST calls. */ - private final ManagedEnvironmentsDiagnosticsService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentsDiagnosticsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentsDiagnostics to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/detectorProperties/rootApi/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRoot( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRootAsync(String resourceGroupName, String environmentName) { - return getRootWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context) { - return getRootWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName) { - return getRootWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java deleted file mode 100644 index 7a4187d4cd52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java +++ /dev/null @@ -1,61 +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.appcontainers.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.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; - -public final class ManagedEnvironmentsDiagnosticsImpl implements ManagedEnvironmentsDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsDiagnosticsImpl.class); - - private final ManagedEnvironmentsDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsDiagnosticsImpl( - ManagedEnvironmentsDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getRootWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ManagedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironment getRoot(String resourceGroupName, String environmentName) { - ManagedEnvironmentInner inner = this.serviceClient().getRoot(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - private ManagedEnvironmentsDiagnosticsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java deleted file mode 100644 index 19aa83d705b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.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.appcontainers.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.appcontainers.fluent.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; - -public final class ManagedEnvironmentsImpl implements ManagedEnvironments { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsImpl.class); - - private final ManagedEnvironmentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsImpl( - ManagedEnvironmentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ManagedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName) { - ManagedEnvironmentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String environmentName) { - this.serviceClient().delete(resourceGroupName, environmentName); - } - - public void delete(String resourceGroupName, String environmentName, Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, context); - } - - public void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope); - } - - public void update( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope, context); - } - - public Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getAuthTokenWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnvironmentAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentAuthToken getAuthToken(String resourceGroupName, String environmentName) { - EnvironmentAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, environmentName); - if (inner != null) { - return new EnvironmentAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName) { - PagedIterable inner = - this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); - } - - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = - this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); - } - - public ManagedEnvironment getById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - this.delete(resourceGroupName, environmentName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - this.delete(resourceGroupName, environmentName, context); - } - - private ManagedEnvironmentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ManagedEnvironmentImpl define(String name) { - return new ManagedEnvironmentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java deleted file mode 100644 index ee07f227ead3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java +++ /dev/null @@ -1,786 +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.appcontainers.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.PathParam; -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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. */ -public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvironmentsStoragesClient { - /** The proxy service used to perform REST calls. */ - private final ManagedEnvironmentsStoragesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsStoragesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentsStoragesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentsStorages to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsStoragesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/storages") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String environmentName) { - return listWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String environmentName, Context context) { - return listWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName) { - return listWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String storageName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String storageName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String environmentName, String storageName) { - return getWithResponseAsync(resourceGroupName, environmentName, storageName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName) { - return getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, storageName, storageEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, storageName, storageEnvelope, context) - .block(); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage resource for managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, storageEnvelope, Context.NONE) - .getValue(); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String storageName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String storageName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String storageName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, storageName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String storageName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String storageName) { - deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java deleted file mode 100644 index dfcc84bf5607..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.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.appcontainers.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.appcontainers.fluent.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStoragesCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; - -public final class ManagedEnvironmentsStoragesImpl implements ManagedEnvironmentsStorages { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsStoragesImpl.class); - - private final ManagedEnvironmentsStoragesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsStoragesImpl( - ManagedEnvironmentsStoragesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ManagedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName) { - ManagedEnvironmentStoragesCollectionInner inner = this.serviceClient().list(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentStoragesCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, storageName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ManagedEnvironmentStorageImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName) { - ManagedEnvironmentStorageInner inner = - this.serviceClient().get(resourceGroupName, environmentName, storageName); - if (inner != null) { - return new ManagedEnvironmentStorageImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, storageName, context); - } - - public void delete(String resourceGroupName, String environmentName, String storageName) { - this.serviceClient().delete(resourceGroupName, environmentName, storageName); - } - - public ManagedEnvironmentStorage getById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, storageName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, storageName, context); - } - - private ManagedEnvironmentsStoragesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ManagedEnvironmentStorageImpl define(String name) { - return new ManagedEnvironmentStorageImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java deleted file mode 100644 index 88bc0b2704a9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java +++ /dev/null @@ -1,261 +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.appcontainers.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in NamespacesClient. */ -public final class NamespacesClientImpl implements NamespacesClient { - /** The proxy service used to perform REST calls. */ - private final NamespacesService service; - - /** The service client containing this operation class. */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of NamespacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NamespacesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientNamespaces to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface NamespacesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" - + "/managedEnvironments/{environmentName}/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context); - } - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponseAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context) - .block(); - } - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse( - resourceGroupName, environmentName, checkNameAvailabilityRequest, Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java deleted file mode 100644 index 167621f13759..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java +++ /dev/null @@ -1,71 +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.appcontainers.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.appcontainers.fluent.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.appcontainers.models.Namespaces; - -public final class NamespacesImpl implements Namespaces { - private static final ClientLogger LOGGER = new ClientLogger(NamespacesImpl.class); - - private final NamespacesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public NamespacesImpl( - NamespacesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - Response inner = - this - .serviceClient() - .checkNameAvailabilityWithResponse( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = - this - .serviceClient() - .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private NamespacesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java deleted file mode 100644 index 1d78896f2723..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; - -public final class OperationDetailImpl implements OperationDetail { - private OperationDetailInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - OperationDetailImpl( - OperationDetailInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public OperationDetailInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java deleted file mode 100644 index 951798c3d460..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,272 +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.appcontainers.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -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 ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.App/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all of the available RP operations. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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())); - } - - /** - * Lists all of the available RP operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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)); - } - - /** - * Lists all of the available RP operations. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the available RP operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the available RP operations. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available RP operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java deleted file mode 100644 index fb3cfe7ac585..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/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.appcontainers.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.appcontainers.fluent.OperationsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import com.azure.resourcemanager.appcontainers.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.appcontainers.ContainerAppsApiManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java deleted file mode 100644 index fcb6c32ab789..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ReplicaCollectionImpl implements ReplicaCollection { - private ReplicaCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ReplicaCollectionImpl( - ReplicaCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new ReplicaImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ReplicaCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java deleted file mode 100644 index cf34ac0584a5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java +++ /dev/null @@ -1,62 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class ReplicaImpl implements Replica { - private ReplicaInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ReplicaImpl( - ReplicaInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public OffsetDateTime createdTime() { - return this.innerModel().createdTime(); - } - - public List containers() { - List inner = this.innerModel().containers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ReplicaInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java deleted file mode 100644 index 7b42cccf03ba..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java +++ /dev/null @@ -1,89 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.Revision; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.time.OffsetDateTime; - -public final class RevisionImpl implements Revision { - private RevisionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - RevisionImpl( - RevisionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public OffsetDateTime createdTime() { - return this.innerModel().createdTime(); - } - - public OffsetDateTime lastActiveTime() { - return this.innerModel().lastActiveTime(); - } - - public String fqdn() { - return this.innerModel().fqdn(); - } - - public Template template() { - return this.innerModel().template(); - } - - public Boolean active() { - return this.innerModel().active(); - } - - public Integer replicas() { - return this.innerModel().replicas(); - } - - public Integer trafficWeight() { - return this.innerModel().trafficWeight(); - } - - public String provisioningError() { - return this.innerModel().provisioningError(); - } - - public RevisionHealthState healthState() { - return this.innerModel().healthState(); - } - - public RevisionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public RevisionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java deleted file mode 100644 index deeb159aabe9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import com.azure.resourcemanager.appcontainers.models.SecretsCollection; -import java.util.Collections; -import java.util.List; - -public final class SecretsCollectionImpl implements SecretsCollection { - private SecretsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - SecretsCollectionImpl( - SecretsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SecretsCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java deleted file mode 100644 index 87912df4a417..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java +++ /dev/null @@ -1,167 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; - -public final class SourceControlImpl implements SourceControl, SourceControl.Definition, SourceControl.Update { - private SourceControlInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SourceControlOperationState operationState() { - return this.innerModel().operationState(); - } - - public String repoUrl() { - return this.innerModel().repoUrl(); - } - - public String branch() { - return this.innerModel().branch(); - } - - public GithubActionConfiguration githubActionConfiguration() { - return this.innerModel().githubActionConfiguration(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public SourceControlInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String sourceControlName; - - public SourceControlImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public SourceControl create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate( - resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); - return this; - } - - public SourceControl create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); - return this; - } - - SourceControlImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new SourceControlInner(); - this.serviceManager = serviceManager; - this.sourceControlName = name; - } - - public SourceControlImpl update() { - return this; - } - - public SourceControl apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate( - resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); - return this; - } - - public SourceControl apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); - return this; - } - - SourceControlImpl( - SourceControlInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.sourceControlName = Utils.getValueFromIdByName(innerObject.id(), "sourcecontrols"); - } - - public SourceControl refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE) - .getValue(); - return this; - } - - public SourceControl refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, context) - .getValue(); - return this; - } - - public SourceControlImpl withRepoUrl(String repoUrl) { - this.innerModel().withRepoUrl(repoUrl); - return this; - } - - public SourceControlImpl withBranch(String branch) { - this.innerModel().withBranch(branch); - return this; - } - - public SourceControlImpl withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - this.innerModel().withGithubActionConfiguration(githubActionConfiguration); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java deleted file mode 100644 index 0ea4b1a2e5c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java +++ /dev/null @@ -1,204 +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.appcontainers.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 Utils { - 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.size() > 0 && 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, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - 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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java deleted file mode 100644 index d53fda0bcb69..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java +++ /dev/null @@ -1,51 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; - -public final class WorkloadProfileStatesImpl implements WorkloadProfileStates { - private WorkloadProfileStatesInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - WorkloadProfileStatesImpl( - WorkloadProfileStatesInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public WorkloadProfileStatesProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public WorkloadProfileStatesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java deleted file mode 100644 index 9eb807ce176a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ /dev/null @@ -1,6 +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 ContainerAppsApiClient. null. */ -package com.azure.resourcemanager.appcontainers.implementation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java deleted file mode 100644 index 8f2d01d44bec..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Access mode for storage. */ -public final class AccessMode extends ExpandableStringEnum { - /** Static value ReadOnly for AccessMode. */ - public static final AccessMode READ_ONLY = fromString("ReadOnly"); - - /** Static value ReadWrite for AccessMode. */ - public static final AccessMode READ_WRITE = fromString("ReadWrite"); - - /** - * Creates or finds a AccessMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessMode. - */ - @JsonCreator - public static AccessMode fromString(String name) { - return fromString(name, AccessMode.class); - } - - /** - * Gets known AccessMode values. - * - * @return known AccessMode values. - */ - public static Collection values() { - return values(AccessMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java deleted file mode 100644 index 08b42558079c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny. */ -public final class Action extends ExpandableStringEnum { - /** Static value Allow for Action. */ - public static final Action ALLOW = fromString("Allow"); - - /** Static value Deny for Action. */ - public static final Action DENY = fromString("Deny"); - - /** - * Creates or finds a Action from its string representation. - * - * @param name a name to look for. - * @return the corresponding Action. - */ - @JsonCreator - public static Action fromString(String name) { - return fromString(name, Action.class); - } - - /** - * Gets known Action values. - * - * @return known Action values. - */ - public static Collection values() { - return values(Action.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java deleted file mode 100644 index 1ade7f9c0e39..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java +++ /dev/null @@ -1,43 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one revision - * can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the - * default.</item></list>. - */ -public final class ActiveRevisionsMode extends ExpandableStringEnum { - /** Static value Multiple for ActiveRevisionsMode. */ - public static final ActiveRevisionsMode MULTIPLE = fromString("Multiple"); - - /** Static value Single for ActiveRevisionsMode. */ - public static final ActiveRevisionsMode SINGLE = fromString("Single"); - - /** - * Creates or finds a ActiveRevisionsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActiveRevisionsMode. - */ - @JsonCreator - public static ActiveRevisionsMode fromString(String name) { - return fromString(name, ActiveRevisionsMode.class); - } - - /** - * Gets known ActiveRevisionsMode values. - * - * @return known ActiveRevisionsMode values. - */ - public static Collection values() { - return values(ActiveRevisionsMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java deleted file mode 100644 index 3a63ecb42ca0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the Allowed Audiences validation flow. */ -@Fluent -public final class AllowedAudiencesValidation { - /* - * The configuration settings of the allowed list of audiences from which to validate the JWT token. - */ - @JsonProperty(value = "allowedAudiences") - private List allowedAudiences; - - /** Creates an instance of AllowedAudiencesValidation class. */ - public AllowedAudiencesValidation() { - } - - /** - * Get the allowedAudiences property: The configuration settings of the allowed list of audiences from which to - * validate the JWT token. - * - * @return the allowedAudiences value. - */ - public List allowedAudiences() { - return this.allowedAudiences; - } - - /** - * Set the allowedAudiences property: The configuration settings of the allowed list of audiences from which to - * validate the JWT token. - * - * @param allowedAudiences the allowedAudiences value to set. - * @return the AllowedAudiencesValidation object itself. - */ - public AllowedAudiencesValidation withAllowedAudiences(List allowedAudiences) { - this.allowedAudiences = allowedAudiences; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java deleted file mode 100644 index 836c4bcc7816..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the Azure Active Directory allowed principals. */ -@Fluent -public final class AllowedPrincipals { - /* - * The list of the allowed groups. - */ - @JsonProperty(value = "groups") - private List groups; - - /* - * The list of the allowed identities. - */ - @JsonProperty(value = "identities") - private List identities; - - /** Creates an instance of AllowedPrincipals class. */ - public AllowedPrincipals() { - } - - /** - * Get the groups property: The list of the allowed groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: The list of the allowed groups. - * - * @param groups the groups value to set. - * @return the AllowedPrincipals object itself. - */ - public AllowedPrincipals withGroups(List groups) { - this.groups = groups; - return this; - } - - /** - * Get the identities property: The list of the allowed identities. - * - * @return the identities value. - */ - public List identities() { - return this.identities; - } - - /** - * Set the identities property: The list of the allowed identities. - * - * @param identities the identities value to set. - * @return the AllowedPrincipals object itself. - */ - public AllowedPrincipals withIdentities(List identities) { - this.identities = identities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java deleted file mode 100644 index 5d0520f20948..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java +++ /dev/null @@ -1,79 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration of application logs. */ -@Fluent -public final class AppLogsConfiguration { - /* - * Logs destination - */ - @JsonProperty(value = "destination") - private String destination; - - /* - * Log Analytics configuration - */ - @JsonProperty(value = "logAnalyticsConfiguration") - private LogAnalyticsConfiguration logAnalyticsConfiguration; - - /** Creates an instance of AppLogsConfiguration class. */ - public AppLogsConfiguration() { - } - - /** - * Get the destination property: Logs destination. - * - * @return the destination value. - */ - public String destination() { - return this.destination; - } - - /** - * Set the destination property: Logs destination. - * - * @param destination the destination value to set. - * @return the AppLogsConfiguration object itself. - */ - public AppLogsConfiguration withDestination(String destination) { - this.destination = destination; - return this; - } - - /** - * Get the logAnalyticsConfiguration property: Log Analytics configuration. - * - * @return the logAnalyticsConfiguration value. - */ - public LogAnalyticsConfiguration logAnalyticsConfiguration() { - return this.logAnalyticsConfiguration; - } - - /** - * Set the logAnalyticsConfiguration property: Log Analytics configuration. - * - * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set. - * @return the AppLogsConfiguration object itself. - */ - public AppLogsConfiguration withLogAnalyticsConfiguration(LogAnalyticsConfiguration logAnalyticsConfiguration) { - this.logAnalyticsConfiguration = logAnalyticsConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logAnalyticsConfiguration() != null) { - logAnalyticsConfiguration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java deleted file mode 100644 index 32c619fd3059..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. */ -public final class AppProtocol extends ExpandableStringEnum { - /** Static value http for AppProtocol. */ - public static final AppProtocol HTTP = fromString("http"); - - /** Static value grpc for AppProtocol. */ - public static final AppProtocol GRPC = fromString("grpc"); - - /** - * Creates or finds a AppProtocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding AppProtocol. - */ - @JsonCreator - public static AppProtocol fromString(String name) { - return fromString(name, AppProtocol.class); - } - - /** - * Gets known AppProtocol values. - * - * @return known AppProtocol values. - */ - public static Collection values() { - return values(AppProtocol.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java deleted file mode 100644 index d3114a04a7e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the app registration for providers that have app ids and app secrets. */ -@Fluent -public final class AppRegistration { - /* - * The App ID of the app used for login. - */ - @JsonProperty(value = "appId") - private String appId; - - /* - * The app setting name that contains the app secret. - */ - @JsonProperty(value = "appSecretSettingName") - private String appSecretSettingName; - - /** Creates an instance of AppRegistration class. */ - public AppRegistration() { - } - - /** - * Get the appId property: The App ID of the app used for login. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId property: The App ID of the app used for login. - * - * @param appId the appId value to set. - * @return the AppRegistration object itself. - */ - public AppRegistration withAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Get the appSecretSettingName property: The app setting name that contains the app secret. - * - * @return the appSecretSettingName value. - */ - public String appSecretSettingName() { - return this.appSecretSettingName; - } - - /** - * Set the appSecretSettingName property: The app setting name that contains the app secret. - * - * @param appSecretSettingName the appSecretSettingName value to set. - * @return the AppRegistration object itself. - */ - public AppRegistration withAppSecretSettingName(String appSecretSettingName) { - this.appSecretSettingName = appSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java deleted file mode 100644 index 34b83d23ca18..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java +++ /dev/null @@ -1,111 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Apple provider. */ -@Fluent -public final class Apple { - /* - * false if the Apple provider should not be enabled despite the set registration; otherwise, - * true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the Apple registration. - */ - @JsonProperty(value = "registration") - private AppleRegistration registration; - - /* - * The configuration settings of the login flow. - */ - @JsonProperty(value = "login") - private LoginScopes login; - - /** Creates an instance of Apple class. */ - public Apple() { - } - - /** - * Get the enabled property: <code>false</code> if the Apple provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Apple provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Apple object itself. - */ - public Apple withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Apple registration. - * - * @return the registration value. - */ - public AppleRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Apple registration. - * - * @param registration the registration value to set. - * @return the Apple object itself. - */ - public Apple withRegistration(AppleRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Apple object itself. - */ - public Apple withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java deleted file mode 100644 index 19013329ef25..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the registration for the Apple provider. */ -@Fluent -public final class AppleRegistration { - /* - * The Client ID of the app used for login. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The app setting name that contains the client secret. - */ - @JsonProperty(value = "clientSecretSettingName") - private String clientSecretSettingName; - - /** Creates an instance of AppleRegistration class. */ - public AppleRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the AppleRegistration object itself. - */ - public AppleRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the AppleRegistration object itself. - */ - public AppleRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java deleted file mode 100644 index 5da623ac844a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** indicates whether the profile is default for the location. */ -public final class Applicability extends ExpandableStringEnum { - /** Static value LocationDefault for Applicability. */ - public static final Applicability LOCATION_DEFAULT = fromString("LocationDefault"); - - /** Static value Custom for Applicability. */ - public static final Applicability CUSTOM = fromString("Custom"); - - /** - * Creates or finds a Applicability from its string representation. - * - * @param name a name to look for. - * @return the corresponding Applicability. - */ - @JsonCreator - public static Applicability fromString(String name) { - return fromString(name, Applicability.class); - } - - /** - * Gets known Applicability values. - * - * @return known Applicability values. - */ - public static Collection values() { - return values(Applicability.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java deleted file mode 100644 index cd2bd12f5dcc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java +++ /dev/null @@ -1,307 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; - -/** An immutable client-side representation of AuthConfig. */ -public interface AuthConfig { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - AuthPlatform platform(); - - /** - * Gets the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - GlobalValidation globalValidation(); - - /** - * Gets the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - IdentityProviders identityProviders(); - - /** - * Gets the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - Login login(); - - /** - * Gets the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - HttpSettings httpSettings(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner object. - * - * @return the inner object. - */ - AuthConfigInner innerModel(); - - /** The entirety of the AuthConfig definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The AuthConfig definition stages. */ - interface DefinitionStages { - /** The first stage of the AuthConfig definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the AuthConfig definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - /** - * The stage of the AuthConfig definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithPlatform, - DefinitionStages.WithGlobalValidation, - DefinitionStages.WithIdentityProviders, - DefinitionStages.WithLogin, - DefinitionStages.WithHttpSettings { - /** - * Executes the create request. - * - * @return the created resource. - */ - AuthConfig create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AuthConfig create(Context context); - } - /** The stage of the AuthConfig definition allowing to specify platform. */ - interface WithPlatform { - /** - * Specifies the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization.. - * - * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withPlatform(AuthPlatform platform); - } - /** The stage of the AuthConfig definition allowing to specify globalValidation. */ - interface WithGlobalValidation { - /** - * Specifies the globalValidation property: The configuration settings that determines the validation flow - * of users using Service Authentication/Authorization.. - * - * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withGlobalValidation(GlobalValidation globalValidation); - } - /** The stage of the AuthConfig definition allowing to specify identityProviders. */ - interface WithIdentityProviders { - /** - * Specifies the identityProviders property: The configuration settings of each of the identity providers - * used to configure ContainerApp Service Authentication/Authorization.. - * - * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withIdentityProviders(IdentityProviders identityProviders); - } - /** The stage of the AuthConfig definition allowing to specify login. */ - interface WithLogin { - /** - * Specifies the login property: The configuration settings of the login flow of users using ContainerApp - * Service Authentication/Authorization.. - * - * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withLogin(Login login); - } - /** The stage of the AuthConfig definition allowing to specify httpSettings. */ - interface WithHttpSettings { - /** - * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication - * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * - * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withHttpSettings(HttpSettings httpSettings); - } - } - /** - * Begins update for the AuthConfig resource. - * - * @return the stage of resource update. - */ - AuthConfig.Update update(); - - /** The template for AuthConfig update. */ - interface Update - extends UpdateStages.WithPlatform, - UpdateStages.WithGlobalValidation, - UpdateStages.WithIdentityProviders, - UpdateStages.WithLogin, - UpdateStages.WithHttpSettings { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AuthConfig apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AuthConfig apply(Context context); - } - /** The AuthConfig update stages. */ - interface UpdateStages { - /** The stage of the AuthConfig update allowing to specify platform. */ - interface WithPlatform { - /** - * Specifies the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization.. - * - * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - Update withPlatform(AuthPlatform platform); - } - /** The stage of the AuthConfig update allowing to specify globalValidation. */ - interface WithGlobalValidation { - /** - * Specifies the globalValidation property: The configuration settings that determines the validation flow - * of users using Service Authentication/Authorization.. - * - * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withGlobalValidation(GlobalValidation globalValidation); - } - /** The stage of the AuthConfig update allowing to specify identityProviders. */ - interface WithIdentityProviders { - /** - * Specifies the identityProviders property: The configuration settings of each of the identity providers - * used to configure ContainerApp Service Authentication/Authorization.. - * - * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withIdentityProviders(IdentityProviders identityProviders); - } - /** The stage of the AuthConfig update allowing to specify login. */ - interface WithLogin { - /** - * Specifies the login property: The configuration settings of the login flow of users using ContainerApp - * Service Authentication/Authorization.. - * - * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - Update withLogin(Login login); - } - /** The stage of the AuthConfig update allowing to specify httpSettings. */ - interface WithHttpSettings { - /** - * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication - * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * - * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withHttpSettings(HttpSettings httpSettings); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AuthConfig refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AuthConfig refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java deleted file mode 100644 index cca73947e6dc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** AuthConfig collection ARM resource. */ -@Fluent -public final class AuthConfigCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of AuthConfigCollection class. */ - public AuthConfigCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the AuthConfigCollection object itself. - */ - public AuthConfigCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AuthConfigCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AuthConfigCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java deleted file mode 100644 index 94143f340220..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java +++ /dev/null @@ -1,85 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ -@Fluent -public final class AuthPlatform { - /* - * true if the Authentication / Authorization feature is enabled for the current app; otherwise, - * false. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The RuntimeVersion of the Authentication / Authorization feature in use for the current app. - * The setting in this value can control the behavior of certain features in the Authentication / Authorization - * module. - */ - @JsonProperty(value = "runtimeVersion") - private String runtimeVersion; - - /** Creates an instance of AuthPlatform class. */ - public AuthPlatform() { - } - - /** - * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled - * for the current app; otherwise, <code>false</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled - * for the current app; otherwise, <code>false</code>. - * - * @param enabled the enabled value to set. - * @return the AuthPlatform object itself. - */ - public AuthPlatform withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the - * current app. The setting in this value can control the behavior of certain features in the Authentication / - * Authorization module. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the - * current app. The setting in this value can control the behavior of certain features in the Authentication / - * Authorization module. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the AuthPlatform object itself. - */ - public AuthPlatform withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java deleted file mode 100644 index 61b0f8789eda..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java +++ /dev/null @@ -1,84 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Available operations of the service. */ -@Fluent -public final class AvailableOperations { - /* - * Collection of available operation details - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of AvailableOperations class. */ - public AvailableOperations() { - } - - /** - * Get the value property: Collection of available operation details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of available operation details. - * - * @param value the value value to set. - * @return the AvailableOperations object itself. - */ - public AvailableOperations withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for - * now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for - * now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the AvailableOperations object itself. - */ - public AvailableOperations withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java deleted file mode 100644 index f3a46738f9df..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; - -/** An immutable client-side representation of AvailableWorkloadProfile. */ -public interface AvailableWorkloadProfile { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: Region of the workload profile. - * - * @return the location value. - */ - String location(); - - /** - * Gets the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - AvailableWorkloadProfileProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner object. - * - * @return the inner object. - */ - AvailableWorkloadProfileInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java deleted file mode 100644 index 8b06a4146d59..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java +++ /dev/null @@ -1,154 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Revision resource specific properties. */ -@Fluent -public final class AvailableWorkloadProfileProperties { - /* - * Used to map workload profile types to billing meter. - */ - @JsonProperty(value = "billingMeterCategory") - private Category billingMeterCategory; - - /* - * indicates whether the profile is default for the location. - */ - @JsonProperty(value = "applicability") - private Applicability applicability; - - /* - * Number of cores in CPU. - */ - @JsonProperty(value = "cores") - private Integer cores; - - /* - * Memory in GiB. - */ - @JsonProperty(value = "memoryGiB") - private Integer memoryGiB; - - /* - * The everyday name of the workload profile. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** Creates an instance of AvailableWorkloadProfileProperties class. */ - public AvailableWorkloadProfileProperties() { - } - - /** - * Get the billingMeterCategory property: Used to map workload profile types to billing meter. - * - * @return the billingMeterCategory value. - */ - public Category billingMeterCategory() { - return this.billingMeterCategory; - } - - /** - * Set the billingMeterCategory property: Used to map workload profile types to billing meter. - * - * @param billingMeterCategory the billingMeterCategory value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withBillingMeterCategory(Category billingMeterCategory) { - this.billingMeterCategory = billingMeterCategory; - return this; - } - - /** - * Get the applicability property: indicates whether the profile is default for the location. - * - * @return the applicability value. - */ - public Applicability applicability() { - return this.applicability; - } - - /** - * Set the applicability property: indicates whether the profile is default for the location. - * - * @param applicability the applicability value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withApplicability(Applicability applicability) { - this.applicability = applicability; - return this; - } - - /** - * Get the cores property: Number of cores in CPU. - * - * @return the cores value. - */ - public Integer cores() { - return this.cores; - } - - /** - * Set the cores property: Number of cores in CPU. - * - * @param cores the cores value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withCores(Integer cores) { - this.cores = cores; - return this; - } - - /** - * Get the memoryGiB property: Memory in GiB. - * - * @return the memoryGiB value. - */ - public Integer memoryGiB() { - return this.memoryGiB; - } - - /** - * Set the memoryGiB property: Memory in GiB. - * - * @param memoryGiB the memoryGiB value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withMemoryGiB(Integer memoryGiB) { - this.memoryGiB = memoryGiB; - return this; - } - - /** - * Get the displayName property: The everyday name of the workload profile. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The everyday name of the workload profile. - * - * @param displayName the displayName value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java deleted file mode 100644 index 30eb8fd64ad8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of AvailableWorkloadProfiles. */ -public interface AvailableWorkloadProfiles { - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String location); - - /** - * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @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 all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String location, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java deleted file mode 100644 index a21dfb315cd7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of available workload profiles in the location. */ -@Fluent -public final class AvailableWorkloadProfilesCollection { - /* - * Collection of workload profiles. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of AvailableWorkloadProfilesCollection class. */ - public AvailableWorkloadProfilesCollection() { - } - - /** - * Get the value property: Collection of workload profiles. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of workload profiles. - * - * @param value the value value to set. - * @return the AvailableWorkloadProfilesCollection object itself. - */ - public AvailableWorkloadProfilesCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model AvailableWorkloadProfilesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java deleted file mode 100644 index a75e724b450f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java +++ /dev/null @@ -1,172 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Azure Active directory provider. */ -@Fluent -public final class AzureActiveDirectory { - /* - * false if the Azure Active Directory provider should not be enabled despite the set registration; - * otherwise, true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the Azure Active Directory app registration. - */ - @JsonProperty(value = "registration") - private AzureActiveDirectoryRegistration registration; - - /* - * The configuration settings of the Azure Active Directory login flow. - */ - @JsonProperty(value = "login") - private AzureActiveDirectoryLogin login; - - /* - * The configuration settings of the Azure Active Directory token validation flow. - */ - @JsonProperty(value = "validation") - private AzureActiveDirectoryValidation validation; - - /* - * Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. - * This is an internal flag primarily intended to support the Azure Management Portal. Users should not - * read or write to this property. - */ - @JsonProperty(value = "isAutoProvisioned") - private Boolean isAutoProvisioned; - - /** Creates an instance of AzureActiveDirectory class. */ - public AzureActiveDirectory() { - } - - /** - * Get the enabled property: <code>false</code> if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Azure Active Directory app registration. - * - * @return the registration value. - */ - public AzureActiveDirectoryRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Azure Active Directory app registration. - * - * @param registration the registration value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withRegistration(AzureActiveDirectoryRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the Azure Active Directory login flow. - * - * @return the login value. - */ - public AzureActiveDirectoryLogin login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the Azure Active Directory login flow. - * - * @param login the login value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withLogin(AzureActiveDirectoryLogin login) { - this.login = login; - return this; - } - - /** - * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @return the validation value. - */ - public AzureActiveDirectoryValidation validation() { - return this.validation; - } - - /** - * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @param validation the validation value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withValidation(AzureActiveDirectoryValidation validation) { - this.validation = validation; - return this; - } - - /** - * Get the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure - * Management Portal. Users should not read or write to this property. - * - * @return the isAutoProvisioned value. - */ - public Boolean isAutoProvisioned() { - return this.isAutoProvisioned; - } - - /** - * Set the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure - * Management Portal. Users should not read or write to this property. - * - * @param isAutoProvisioned the isAutoProvisioned value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withIsAutoProvisioned(Boolean isAutoProvisioned) { - this.isAutoProvisioned = isAutoProvisioned; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - if (validation() != null) { - validation().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java deleted file mode 100644 index 8f56e461f975..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java +++ /dev/null @@ -1,83 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the Azure Active Directory login flow. */ -@Fluent -public final class AzureActiveDirectoryLogin { - /* - * Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - */ - @JsonProperty(value = "loginParameters") - private List loginParameters; - - /* - * true if the www-authenticate provider should be omitted from the request; otherwise, - * false. - */ - @JsonProperty(value = "disableWWWAuthenticate") - private Boolean disableWwwAuthenticate; - - /** Creates an instance of AzureActiveDirectoryLogin class. */ - public AzureActiveDirectoryLogin() { - } - - /** - * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a - * user logs in. Each parameter must be in the form "key=value". - * - * @return the loginParameters value. - */ - public List loginParameters() { - return this.loginParameters; - } - - /** - * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a - * user logs in. Each parameter must be in the form "key=value". - * - * @param loginParameters the loginParameters value to set. - * @return the AzureActiveDirectoryLogin object itself. - */ - public AzureActiveDirectoryLogin withLoginParameters(List loginParameters) { - this.loginParameters = loginParameters; - return this; - } - - /** - * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be - * omitted from the request; otherwise, <code>false</code>. - * - * @return the disableWwwAuthenticate value. - */ - public Boolean disableWwwAuthenticate() { - return this.disableWwwAuthenticate; - } - - /** - * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be - * omitted from the request; otherwise, <code>false</code>. - * - * @param disableWwwAuthenticate the disableWwwAuthenticate value to set. - * @return the AzureActiveDirectoryLogin object itself. - */ - public AzureActiveDirectoryLogin withDisableWwwAuthenticate(Boolean disableWwwAuthenticate) { - this.disableWwwAuthenticate = disableWwwAuthenticate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java deleted file mode 100644 index 4ce29639d257..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java +++ /dev/null @@ -1,220 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Azure Active Directory app registration. */ -@Fluent -public final class AzureActiveDirectoryRegistration { - /* - * The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. - * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. - * https://login.microsoftonline.com/v2.0/{tenant-guid}/. - * This URI is a case-sensitive identifier for the token issuer. - * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html - */ - @JsonProperty(value = "openIdIssuer") - private String openIdIssuer; - - /* - * The Client ID of this relying party application, known as the client_id. - * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The app setting name that contains the client secret of the relying party application. - */ - @JsonProperty(value = "clientSecretSettingName") - private String clientSecretSettingName; - - /* - * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This - * property acts as - * a replacement for the Client Secret. It is also optional. - */ - @JsonProperty(value = "clientSecretCertificateThumbprint") - private String clientSecretCertificateThumbprint; - - /* - * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for - * signing purposes. This property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - @JsonProperty(value = "clientSecretCertificateSubjectAlternativeName") - private String clientSecretCertificateSubjectAlternativeName; - - /* - * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. - * This property acts as - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - @JsonProperty(value = "clientSecretCertificateIssuer") - private String clientSecretCertificateIssuer; - - /** Creates an instance of AzureActiveDirectoryRegistration class. */ - public AzureActiveDirectoryRegistration() { - } - - /** - * Get the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access - * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, - * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token - * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. - * - * @return the openIdIssuer value. - */ - public String openIdIssuer() { - return this.openIdIssuer; - } - - /** - * Set the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access - * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, - * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token - * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. - * - * @param openIdIssuer the openIdIssuer value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withOpenIdIssuer(String openIdIssuer) { - this.openIdIssuer = openIdIssuer; - return this; - } - - /** - * Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting - * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID - * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting - * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID - * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * - * @param clientId the clientId value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying - * party application. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying - * party application. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint - * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also - * optional. - * - * @return the clientSecretCertificateThumbprint value. - */ - public String clientSecretCertificateThumbprint() { - return this.clientSecretCertificateThumbprint; - } - - /** - * Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint - * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also - * optional. - * - * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretCertificateThumbprint( - String clientSecretCertificateThumbprint) { - this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; - return this; - } - - /** - * Get the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, - * that is the subject alternative name of a certificate used for signing purposes. This property acts as a - * replacement for the Client Secret Certificate Thumbprint. It is also optional. - * - * @return the clientSecretCertificateSubjectAlternativeName value. - */ - public String clientSecretCertificateSubjectAlternativeName() { - return this.clientSecretCertificateSubjectAlternativeName; - } - - /** - * Set the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, - * that is the subject alternative name of a certificate used for signing purposes. This property acts as a - * replacement for the Client Secret Certificate Thumbprint. It is also optional. - * - * @param clientSecretCertificateSubjectAlternativeName the clientSecretCertificateSubjectAlternativeName value to - * set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretCertificateSubjectAlternativeName( - String clientSecretCertificateSubjectAlternativeName) { - this.clientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; - return this; - } - - /** - * Get the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the - * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret - * Certificate Thumbprint. It is also optional. - * - * @return the clientSecretCertificateIssuer value. - */ - public String clientSecretCertificateIssuer() { - return this.clientSecretCertificateIssuer; - } - - /** - * Set the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the - * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret - * Certificate Thumbprint. It is also optional. - * - * @param clientSecretCertificateIssuer the clientSecretCertificateIssuer value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretCertificateIssuer(String clientSecretCertificateIssuer) { - this.clientSecretCertificateIssuer = clientSecretCertificateIssuer; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java deleted file mode 100644 index 8b67f4fdf715..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java +++ /dev/null @@ -1,114 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the Azure Active Directory token validation flow. */ -@Fluent -public final class AzureActiveDirectoryValidation { - /* - * The configuration settings of the checks that should be made while validating the JWT Claims. - */ - @JsonProperty(value = "jwtClaimChecks") - private JwtClaimChecks jwtClaimChecks; - - /* - * The list of audiences that can make successful authentication/authorization requests. - */ - @JsonProperty(value = "allowedAudiences") - private List allowedAudiences; - - /* - * The configuration settings of the default authorization policy. - */ - @JsonProperty(value = "defaultAuthorizationPolicy") - private DefaultAuthorizationPolicy defaultAuthorizationPolicy; - - /** Creates an instance of AzureActiveDirectoryValidation class. */ - public AzureActiveDirectoryValidation() { - } - - /** - * Get the jwtClaimChecks property: The configuration settings of the checks that should be made while validating - * the JWT Claims. - * - * @return the jwtClaimChecks value. - */ - public JwtClaimChecks jwtClaimChecks() { - return this.jwtClaimChecks; - } - - /** - * Set the jwtClaimChecks property: The configuration settings of the checks that should be made while validating - * the JWT Claims. - * - * @param jwtClaimChecks the jwtClaimChecks value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation withJwtClaimChecks(JwtClaimChecks jwtClaimChecks) { - this.jwtClaimChecks = jwtClaimChecks; - return this; - } - - /** - * Get the allowedAudiences property: The list of audiences that can make successful authentication/authorization - * requests. - * - * @return the allowedAudiences value. - */ - public List allowedAudiences() { - return this.allowedAudiences; - } - - /** - * Set the allowedAudiences property: The list of audiences that can make successful authentication/authorization - * requests. - * - * @param allowedAudiences the allowedAudiences value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation withAllowedAudiences(List allowedAudiences) { - this.allowedAudiences = allowedAudiences; - return this; - } - - /** - * Get the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * - * @return the defaultAuthorizationPolicy value. - */ - public DefaultAuthorizationPolicy defaultAuthorizationPolicy() { - return this.defaultAuthorizationPolicy; - } - - /** - * Set the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * - * @param defaultAuthorizationPolicy the defaultAuthorizationPolicy value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation withDefaultAuthorizationPolicy( - DefaultAuthorizationPolicy defaultAuthorizationPolicy) { - this.defaultAuthorizationPolicy = defaultAuthorizationPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jwtClaimChecks() != null) { - jwtClaimChecks().validate(); - } - if (defaultAuthorizationPolicy() != null) { - defaultAuthorizationPolicy().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java deleted file mode 100644 index 256228a58237..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java +++ /dev/null @@ -1,128 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App credentials. */ -@Fluent -public final class AzureCredentials { - /* - * Client Id. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * Client Secret. - */ - @JsonProperty(value = "clientSecret") - private String clientSecret; - - /* - * Tenant Id. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * Subscription Id. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /** Creates an instance of AzureCredentials class. */ - public AzureCredentials() { - } - - /** - * Get the clientId property: Client Id. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: Client Id. - * - * @param clientId the clientId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret property: Client Secret. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: Client Secret. - * - * @param clientSecret the clientSecret value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the tenantId property: Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant Id. - * - * @param tenantId the tenantId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the subscriptionId property: Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java deleted file mode 100644 index a5aa32a2dc53..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java +++ /dev/null @@ -1,128 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure File Properties. */ -@Fluent -public final class AzureFileProperties { - /* - * Storage account name for azure file. - */ - @JsonProperty(value = "accountName") - private String accountName; - - /* - * Storage account key for azure file. - */ - @JsonProperty(value = "accountKey") - private String accountKey; - - /* - * Access mode for storage - */ - @JsonProperty(value = "accessMode") - private AccessMode accessMode; - - /* - * Azure file share name. - */ - @JsonProperty(value = "shareName") - private String shareName; - - /** Creates an instance of AzureFileProperties class. */ - public AzureFileProperties() { - } - - /** - * Get the accountName property: Storage account name for azure file. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: Storage account name for azure file. - * - * @param accountName the accountName value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the accountKey property: Storage account key for azure file. - * - * @return the accountKey value. - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey property: Storage account key for azure file. - * - * @param accountKey the accountKey value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - - /** - * Get the accessMode property: Access mode for storage. - * - * @return the accessMode value. - */ - public AccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Access mode for storage. - * - * @param accessMode the accessMode value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccessMode(AccessMode accessMode) { - this.accessMode = accessMode; - return this; - } - - /** - * Get the shareName property: Azure file share name. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Set the shareName property: Azure file share name. - * - * @param shareName the shareName value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withShareName(String shareName) { - this.shareName = shareName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java deleted file mode 100644 index 8d4937e08dc4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java +++ /dev/null @@ -1,82 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Azure Static Web Apps provider. */ -@Fluent -public final class AzureStaticWebApps { - /* - * false if the Azure Static Web Apps provider should not be enabled despite the set registration; - * otherwise, true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the Azure Static Web Apps registration. - */ - @JsonProperty(value = "registration") - private AzureStaticWebAppsRegistration registration; - - /** Creates an instance of AzureStaticWebApps class. */ - public AzureStaticWebApps() { - } - - /** - * Get the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the AzureStaticWebApps object itself. - */ - public AzureStaticWebApps withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Azure Static Web Apps registration. - * - * @return the registration value. - */ - public AzureStaticWebAppsRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Azure Static Web Apps registration. - * - * @param registration the registration value to set. - * @return the AzureStaticWebApps object itself. - */ - public AzureStaticWebApps withRegistration(AzureStaticWebAppsRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java deleted file mode 100644 index cdb01ec16a07..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the registration for the Azure Static Web Apps provider. */ -@Fluent -public final class AzureStaticWebAppsRegistration { - /* - * The Client ID of the app used for login. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /** Creates an instance of AzureStaticWebAppsRegistration class. */ - public AzureStaticWebAppsRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the AzureStaticWebAppsRegistration object itself. - */ - public AzureStaticWebAppsRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java deleted file mode 100644 index d82e18e74af1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ /dev/null @@ -1,216 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App base container definition. */ -@Fluent -public class BaseContainer { - /* - * Container image tag. - */ - @JsonProperty(value = "image") - private String image; - - /* - * Custom container name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Container start command. - */ - @JsonProperty(value = "command") - private List command; - - /* - * Container start command arguments. - */ - @JsonProperty(value = "args") - private List args; - - /* - * Container environment variables. - */ - @JsonProperty(value = "env") - private List env; - - /* - * Container resource requirements. - */ - @JsonProperty(value = "resources") - private ContainerResources resources; - - /* - * Container volume mounts. - */ - @JsonProperty(value = "volumeMounts") - private List volumeMounts; - - /** Creates an instance of BaseContainer class. */ - public BaseContainer() { - } - - /** - * Get the image property: Container image tag. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Container image tag. - * - * @param image the image value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the name property: Custom container name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Custom container name. - * - * @param name the name value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the command property: Container start command. - * - * @return the command value. - */ - public List command() { - return this.command; - } - - /** - * Set the command property: Container start command. - * - * @param command the command value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withCommand(List command) { - this.command = command; - return this; - } - - /** - * Get the args property: Container start command arguments. - * - * @return the args value. - */ - public List args() { - return this.args; - } - - /** - * Set the args property: Container start command arguments. - * - * @param args the args value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withArgs(List args) { - this.args = args; - return this; - } - - /** - * Get the env property: Container environment variables. - * - * @return the env value. - */ - public List env() { - return this.env; - } - - /** - * Set the env property: Container environment variables. - * - * @param env the env value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withEnv(List env) { - this.env = env; - return this; - } - - /** - * Get the resources property: Container resource requirements. - * - * @return the resources value. - */ - public ContainerResources resources() { - return this.resources; - } - - /** - * Set the resources property: Container resource requirements. - * - * @param resources the resources value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withResources(ContainerResources resources) { - this.resources = resources; - return this; - } - - /** - * Get the volumeMounts property: Container volume mounts. - * - * @return the volumeMounts value. - */ - public List volumeMounts() { - return this.volumeMounts; - } - - /** - * Set the volumeMounts property: Container volume mounts. - * - * @param volumeMounts the volumeMounts value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withVolumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (env() != null) { - env().forEach(e -> e.validate()); - } - if (resources() != null) { - resources().validate(); - } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java deleted file mode 100644 index 91dbe4dc9194..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java +++ /dev/null @@ -1,96 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A premium billing meter. */ -@Fluent -public final class BillingMeter extends ProxyResource { - /* - * Region for the billing meter. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Revision resource specific properties - */ - @JsonProperty(value = "properties") - private BillingMeterProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of BillingMeter class. */ - public BillingMeter() { - } - - /** - * Get the location property: Region for the billing meter. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region for the billing meter. - * - * @param location the location value to set. - * @return the BillingMeter object itself. - */ - public BillingMeter withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - public BillingMeterProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Revision resource specific properties. - * - * @param properties the properties value to set. - * @return the BillingMeter object itself. - */ - public BillingMeter withProperties(BillingMeterProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java deleted file mode 100644 index 167deef302ed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java +++ /dev/null @@ -1,25 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import java.util.List; - -/** An immutable client-side representation of BillingMeterCollection. */ -public interface BillingMeterCollection { - /** - * Gets the value property: Collection of billing meters. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner object. - * - * @return the inner object. - */ - BillingMeterCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java deleted file mode 100644 index d60049b6b205..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Revision resource specific properties. */ -@Fluent -public final class BillingMeterProperties { - /* - * Used to map workload profile types to billing meter. - */ - @JsonProperty(value = "category") - private Category category; - - /* - * Billing meter type. - */ - @JsonProperty(value = "meterType") - private String meterType; - - /* - * The everyday name of the billing meter. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** Creates an instance of BillingMeterProperties class. */ - public BillingMeterProperties() { - } - - /** - * Get the category property: Used to map workload profile types to billing meter. - * - * @return the category value. - */ - public Category category() { - return this.category; - } - - /** - * Set the category property: Used to map workload profile types to billing meter. - * - * @param category the category value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withCategory(Category category) { - this.category = category; - return this; - } - - /** - * Get the meterType property: Billing meter type. - * - * @return the meterType value. - */ - public String meterType() { - return this.meterType; - } - - /** - * Set the meterType property: Billing meter type. - * - * @param meterType the meterType value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withMeterType(String meterType) { - this.meterType = meterType; - return this; - } - - /** - * Get the displayName property: The everyday name of the billing meter. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The everyday name of the billing meter. - * - * @param displayName the displayName value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java deleted file mode 100644 index c67c45e0e69d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of BillingMeters. */ -public interface BillingMeters { - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location along with {@link Response}. - */ - Response getWithResponse(String location, Context context); - - /** - * Get billing meters by location. - * - *

Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all billingMeters for a location. - */ - BillingMeterCollection get(String location); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java deleted file mode 100644 index 675cbf07a216..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Custom Domain binding type. */ -public final class BindingType extends ExpandableStringEnum { - /** Static value Disabled for BindingType. */ - public static final BindingType DISABLED = fromString("Disabled"); - - /** Static value SniEnabled for BindingType. */ - public static final BindingType SNI_ENABLED = fromString("SniEnabled"); - - /** - * Creates or finds a BindingType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BindingType. - */ - @JsonCreator - public static BindingType fromString(String name) { - return fromString(name, BindingType.class); - } - - /** - * Gets known BindingType values. - * - * @return known BindingType values. - */ - public static Collection values() { - return values(BindingType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java deleted file mode 100644 index 0d54e4ba911a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Used to map workload profile types to billing meter. */ -public final class Category extends ExpandableStringEnum { - /** Static value PremiumSkuGeneralPurpose for Category. */ - public static final Category PREMIUM_SKU_GENERAL_PURPOSE = fromString("PremiumSkuGeneralPurpose"); - - /** Static value PremiumSkuMemoryOptimized for Category. */ - public static final Category PREMIUM_SKU_MEMORY_OPTIMIZED = fromString("PremiumSkuMemoryOptimized"); - - /** Static value PremiumSkuComputeOptimized for Category. */ - public static final Category PREMIUM_SKU_COMPUTE_OPTIMIZED = fromString("PremiumSkuComputeOptimized"); - - /** - * Creates or finds a Category from its string representation. - * - * @param name a name to look for. - * @return the corresponding Category. - */ - @JsonCreator - public static Category fromString(String name) { - return fromString(name, Category.class); - } - - /** - * Gets known Category values. - * - * @return known Category values. - */ - public static Collection values() { - return values(Category.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java deleted file mode 100644 index d54e84215e26..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java +++ /dev/null @@ -1,225 +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.appcontainers.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import java.util.Map; - -/** An immutable client-side representation of Certificate. */ -public interface Certificate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - CertificateProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner object. - * - * @return the inner object. - */ - CertificateInner innerModel(); - - /** The entirety of the Certificate definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The Certificate definition stages. */ - interface DefinitionStages { - /** The first stage of the Certificate definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Certificate definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the Certificate definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - /** - * The stage of the Certificate definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Certificate create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Certificate create(Context context); - } - /** The stage of the Certificate definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the Certificate definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Certificate resource specific properties. - * - * @param properties Certificate resource specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(CertificateProperties properties); - } - } - /** - * Begins update for the Certificate resource. - * - * @return the stage of resource update. - */ - Certificate.Update update(); - - /** The template for Certificate update. */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Certificate apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Certificate apply(Context context); - } - /** The Certificate update stages. */ - interface UpdateStages { - /** The stage of the Certificate update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * - * @param tags Application-specific metadata in the form of key-value pairs. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Certificate refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Certificate refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java deleted file mode 100644 index b2d35859d852..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of Certificates. */ -@Fluent -public final class CertificateCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of CertificateCollection class. */ - public CertificateCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the CertificateCollection object itself. - */ - public CertificateCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model CertificateCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java deleted file mode 100644 index f567a5f4f7d8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** A certificate to update. */ -@Fluent -public final class CertificatePatch { - /* - * Application-specific metadata in the form of key-value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** Creates an instance of CertificatePatch class. */ - public CertificatePatch() { - } - - /** - * Get the tags property: Application-specific metadata in the form of key-value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Application-specific metadata in the form of key-value pairs. - * - * @param tags the tags value to set. - * @return the CertificatePatch object itself. - */ - public CertificatePatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java deleted file mode 100644 index efc126b11fcb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ /dev/null @@ -1,214 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Certificate resource specific properties. */ -@Fluent -public final class CertificateProperties { - /* - * Provisioning state of the certificate. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private CertificateProvisioningState provisioningState; - - /* - * Certificate password. - */ - @JsonProperty(value = "password") - private String password; - - /* - * Subject name of the certificate. - */ - @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) - private String subjectName; - - /* - * Subject alternative names the certificate applies to. - */ - @JsonProperty(value = "subjectAlternativeNames", access = JsonProperty.Access.WRITE_ONLY) - private List subjectAlternativeNames; - - /* - * PFX or PEM blob - */ - @JsonProperty(value = "value") - private byte[] value; - - /* - * Certificate issuer. - */ - @JsonProperty(value = "issuer", access = JsonProperty.Access.WRITE_ONLY) - private String issuer; - - /* - * Certificate issue Date. - */ - @JsonProperty(value = "issueDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime issueDate; - - /* - * Certificate expiration date. - */ - @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expirationDate; - - /* - * Certificate thumbprint. - */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) - private String thumbprint; - - /* - * Is the certificate valid?. - */ - @JsonProperty(value = "valid", access = JsonProperty.Access.WRITE_ONLY) - private Boolean valid; - - /* - * Public key hash. - */ - @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) - private String publicKeyHash; - - /** Creates an instance of CertificateProperties class. */ - public CertificateProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the certificate. - * - * @return the provisioningState value. - */ - public CertificateProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the password property: Certificate password. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Certificate password. - * - * @param password the password value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the subjectName property: Subject name of the certificate. - * - * @return the subjectName value. - */ - public String subjectName() { - return this.subjectName; - } - - /** - * Get the subjectAlternativeNames property: Subject alternative names the certificate applies to. - * - * @return the subjectAlternativeNames value. - */ - public List subjectAlternativeNames() { - return this.subjectAlternativeNames; - } - - /** - * Get the value property: PFX or PEM blob. - * - * @return the value value. - */ - public byte[] value() { - return CoreUtils.clone(this.value); - } - - /** - * Set the value property: PFX or PEM blob. - * - * @param value the value value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties withValue(byte[] value) { - this.value = CoreUtils.clone(value); - return this; - } - - /** - * Get the issuer property: Certificate issuer. - * - * @return the issuer value. - */ - public String issuer() { - return this.issuer; - } - - /** - * Get the issueDate property: Certificate issue Date. - * - * @return the issueDate value. - */ - public OffsetDateTime issueDate() { - return this.issueDate; - } - - /** - * Get the expirationDate property: Certificate expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the thumbprint property: Certificate thumbprint. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Get the valid property: Is the certificate valid?. - * - * @return the valid value. - */ - public Boolean valid() { - return this.valid; - } - - /** - * Get the publicKeyHash property: Public key hash. - * - * @return the publicKeyHash value. - */ - public String publicKeyHash() { - return this.publicKeyHash; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java deleted file mode 100644 index af98d56fd8b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java +++ /dev/null @@ -1,47 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Provisioning state of the certificate. */ -public final class CertificateProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for CertificateProvisioningState. */ - public static final CertificateProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for CertificateProvisioningState. */ - public static final CertificateProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for CertificateProvisioningState. */ - public static final CertificateProvisioningState CANCELED = fromString("Canceled"); - - /** Static value DeleteFailed for CertificateProvisioningState. */ - public static final CertificateProvisioningState DELETE_FAILED = fromString("DeleteFailed"); - - /** Static value Pending for CertificateProvisioningState. */ - public static final CertificateProvisioningState PENDING = fromString("Pending"); - - /** - * Creates or finds a CertificateProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding CertificateProvisioningState. - */ - @JsonCreator - public static CertificateProvisioningState fromString(String name) { - return fromString(name, CertificateProvisioningState.class); - } - - /** - * Gets known CertificateProvisioningState values. - * - * @return known CertificateProvisioningState values. - */ - public static Collection values() { - return values(CertificateProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java deleted file mode 100644 index 7a068f3e8d0b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java +++ /dev/null @@ -1,155 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Certificates. */ -public interface Certificates { - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Certificates in a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - Certificate get(String resourceGroupName, String environmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String environmentName, String certificateName); - - /** - * Get the specified Certificate. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - Certificate getById(String id); - - /** - * Get the specified Certificate. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified Certificate. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes the specified Certificate. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Certificate resource. - * - * @param name resource name. - * @return the first stage of the new Certificate definition. - */ - Certificate.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java deleted file mode 100644 index 3a44345d05f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The reason why the given name is not available. */ -public final class CheckNameAvailabilityReason extends ExpandableStringEnum { - /** Static value Invalid for CheckNameAvailabilityReason. */ - public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); - - /** Static value AlreadyExists for CheckNameAvailabilityReason. */ - public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); - - /** - * Creates or finds a CheckNameAvailabilityReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding CheckNameAvailabilityReason. - */ - @JsonCreator - public static CheckNameAvailabilityReason fromString(String name) { - return fromString(name, CheckNameAvailabilityReason.class); - } - - /** - * Gets known CheckNameAvailabilityReason values. - * - * @return known CheckNameAvailabilityReason values. - */ - public static Collection values() { - return values(CheckNameAvailabilityReason.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java deleted file mode 100644 index ebdac57ca900..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The check availability request body. */ -@Fluent -public final class CheckNameAvailabilityRequest { - /* - * The name of the resource for which availability needs to be checked. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** Creates an instance of CheckNameAvailabilityRequest class. */ - public CheckNameAvailabilityRequest() { - } - - /** - * Get the name property: The name of the resource for which availability needs to be checked. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the resource for which availability needs to be checked. - * - * @param name the name value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The resource type. - * - * @param type the type value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java deleted file mode 100644 index 7f61f59cc2a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; - -/** An immutable client-side representation of CheckNameAvailabilityResponse. */ -public interface CheckNameAvailabilityResponse { - /** - * Gets the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason why the given name is not available. - * - * @return the reason value. - */ - CheckNameAvailabilityReason reason(); - - /** - * Gets the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner object. - * - * @return the inner object. - */ - CheckNameAvailabilityResponseInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java deleted file mode 100644 index 9486ee8854e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java +++ /dev/null @@ -1,48 +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.appcontainers.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The method that should be used to authenticate the user. */ -public enum ClientCredentialMethod { - /** Enum value ClientSecretPost. */ - CLIENT_SECRET_POST("ClientSecretPost"); - - /** The actual serialized value for a ClientCredentialMethod instance. */ - private final String value; - - ClientCredentialMethod(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ClientCredentialMethod instance. - * - * @param value the serialized value to parse. - * @return the parsed ClientCredentialMethod object, or null if unable to parse. - */ - @JsonCreator - public static ClientCredentialMethod fromString(String value) { - if (value == null) { - return null; - } - ClientCredentialMethod[] items = ClientCredentialMethod.values(); - for (ClientCredentialMethod item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java deleted file mode 100644 index d8d3cdfcf9ba..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the app registration for providers that have client ids and client secrets. */ -@Fluent -public final class ClientRegistration { - /* - * The Client ID of the app used for login. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The app setting name that contains the client secret. - */ - @JsonProperty(value = "clientSecretSettingName") - private String clientSecretSettingName; - - /** Creates an instance of ClientRegistration class. */ - public ClientRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the ClientRegistration object itself. - */ - public ClientRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the ClientRegistration object itself. - */ - public ClientRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java deleted file mode 100644 index 230e78772bb1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ /dev/null @@ -1,203 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Non versioned Container App configuration properties that define the mutable settings of a Container app. */ -@Fluent -public final class Configuration { - /* - * Collection of secrets used by a Container app - */ - @JsonProperty(value = "secrets") - private List secrets; - - /* - * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active.Single: Only one revision can be active at a - * time. Revision weights can not be used in this mode. If no value if provided, this is the default. - */ - @JsonProperty(value = "activeRevisionsMode") - private ActiveRevisionsMode activeRevisionsMode; - - /* - * Ingress configurations. - */ - @JsonProperty(value = "ingress") - private Ingress ingress; - - /* - * Collection of private container registry credentials for containers used by the Container app - */ - @JsonProperty(value = "registries") - private List registries; - - /* - * Dapr configuration for the Container App. - */ - @JsonProperty(value = "dapr") - private Dapr dapr; - - /* - * Optional. Max inactive revisions a Container App can have. - */ - @JsonProperty(value = "maxInactiveRevisions") - private Integer maxInactiveRevisions; - - /** Creates an instance of Configuration class. */ - public Configuration() { - } - - /** - * Get the secrets property: Collection of secrets used by a Container app. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Collection of secrets used by a Container app. - * - * @param secrets the secrets value to set. - * @return the Configuration object itself. - */ - public Configuration withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the - * Container app: <list><item>Multiple: multiple revisions can be - * active.</item><item>Single: Only one revision can be active at a time. Revision weights can not be - * used in this mode. If no value if provided, this is the default.</item></list>. - * - * @return the activeRevisionsMode value. - */ - public ActiveRevisionsMode activeRevisionsMode() { - return this.activeRevisionsMode; - } - - /** - * Set the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the - * Container app: <list><item>Multiple: multiple revisions can be - * active.</item><item>Single: Only one revision can be active at a time. Revision weights can not be - * used in this mode. If no value if provided, this is the default.</item></list>. - * - * @param activeRevisionsMode the activeRevisionsMode value to set. - * @return the Configuration object itself. - */ - public Configuration withActiveRevisionsMode(ActiveRevisionsMode activeRevisionsMode) { - this.activeRevisionsMode = activeRevisionsMode; - return this; - } - - /** - * Get the ingress property: Ingress configurations. - * - * @return the ingress value. - */ - public Ingress ingress() { - return this.ingress; - } - - /** - * Set the ingress property: Ingress configurations. - * - * @param ingress the ingress value to set. - * @return the Configuration object itself. - */ - public Configuration withIngress(Ingress ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the registries property: Collection of private container registry credentials for containers used by the - * Container app. - * - * @return the registries value. - */ - public List registries() { - return this.registries; - } - - /** - * Set the registries property: Collection of private container registry credentials for containers used by the - * Container app. - * - * @param registries the registries value to set. - * @return the Configuration object itself. - */ - public Configuration withRegistries(List registries) { - this.registries = registries; - return this; - } - - /** - * Get the dapr property: Dapr configuration for the Container App. - * - * @return the dapr value. - */ - public Dapr dapr() { - return this.dapr; - } - - /** - * Set the dapr property: Dapr configuration for the Container App. - * - * @param dapr the dapr value to set. - * @return the Configuration object itself. - */ - public Configuration withDapr(Dapr dapr) { - this.dapr = dapr; - return this; - } - - /** - * Get the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. - * - * @return the maxInactiveRevisions value. - */ - public Integer maxInactiveRevisions() { - return this.maxInactiveRevisions; - } - - /** - * Set the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. - * - * @param maxInactiveRevisions the maxInactiveRevisions value to set. - * @return the Configuration object itself. - */ - public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { - this.maxInactiveRevisions = maxInactiveRevisions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (ingress() != null) { - ingress().validate(); - } - if (registries() != null) { - registries().forEach(e -> e.validate()); - } - if (dapr() != null) { - dapr().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java deleted file mode 100644 index 76246c732054..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java +++ /dev/null @@ -1,351 +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.appcontainers.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import java.util.Map; - -/** An immutable client-side representation of ConnectedEnvironment. */ -public interface ConnectedEnvironment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - ConnectedEnvironmentProvisioningState provisioningState(); - - /** - * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - String deploymentErrors(); - - /** - * Gets the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - String defaultDomain(); - - /** - * Gets the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - String staticIp(); - - /** - * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - String daprAIConnectionString(); - - /** - * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - CustomDomainConfiguration customDomainConfiguration(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner object. - * - * @return the inner object. - */ - ConnectedEnvironmentInner innerModel(); - - /** The entirety of the ConnectedEnvironment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The ConnectedEnvironment definition stages. */ - interface DefinitionStages { - /** The first stage of the ConnectedEnvironment definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ConnectedEnvironment definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the ConnectedEnvironment definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the ConnectedEnvironment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithExtendedLocation, - DefinitionStages.WithStaticIp, - DefinitionStages.WithDaprAIConnectionString, - DefinitionStages.WithCustomDomainConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - ConnectedEnvironment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ConnectedEnvironment create(Context context); - } - /** The stage of the ConnectedEnvironment definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the ConnectedEnvironment definition allowing to specify extendedLocation. */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - /** The stage of the ConnectedEnvironment definition allowing to specify staticIp. */ - interface WithStaticIp { - /** - * Specifies the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp Static IP of the connectedEnvironment. - * @return the next definition stage. - */ - WithCreate withStaticIp(String staticIp); - } - /** The stage of the ConnectedEnvironment definition allowing to specify daprAIConnectionString. */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIConnectionString(String daprAIConnectionString); - } - /** The stage of the ConnectedEnvironment definition allowing to specify customDomainConfiguration. */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - } - /** - * Begins update for the ConnectedEnvironment resource. - * - * @return the stage of resource update. - */ - ConnectedEnvironment.Update update(); - - /** The template for ConnectedEnvironment update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithExtendedLocation, - UpdateStages.WithStaticIp, - UpdateStages.WithDaprAIConnectionString, - UpdateStages.WithCustomDomainConfiguration { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ConnectedEnvironment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ConnectedEnvironment apply(Context context); - } - /** The ConnectedEnvironment update stages. */ - interface UpdateStages { - /** The stage of the ConnectedEnvironment update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the ConnectedEnvironment update allowing to specify extendedLocation. */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - /** The stage of the ConnectedEnvironment update allowing to specify staticIp. */ - interface WithStaticIp { - /** - * Specifies the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp Static IP of the connectedEnvironment. - * @return the next definition stage. - */ - Update withStaticIp(String staticIp); - } - /** The stage of the ConnectedEnvironment update allowing to specify daprAIConnectionString. */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIConnectionString(String daprAIConnectionString); - } - /** The stage of the ConnectedEnvironment update allowing to specify customDomainConfiguration. */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ConnectedEnvironment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ConnectedEnvironment refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java deleted file mode 100644 index 7b7e7fcb9144..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java +++ /dev/null @@ -1,70 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of connectedEnvironments. */ -@Fluent -public final class ConnectedEnvironmentCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value") - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ConnectedEnvironmentCollection class. */ - public ConnectedEnvironmentCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the ConnectedEnvironmentCollection object itself. - */ - public ConnectedEnvironmentCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java deleted file mode 100644 index cfb4a1c8867c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Provisioning state of the Kubernetes Environment. */ -public final class ConnectedEnvironmentProvisioningState - extends ExpandableStringEnum { - /** Static value Succeeded for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Waiting for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState WAITING = fromString("Waiting"); - - /** Static value InitializationInProgress for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INITIALIZATION_IN_PROGRESS = - fromString("InitializationInProgress"); - - /** Static value InfrastructureSetupInProgress for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS = - fromString("InfrastructureSetupInProgress"); - - /** Static value InfrastructureSetupComplete for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE = - fromString("InfrastructureSetupComplete"); - - /** Static value ScheduledForDelete for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); - - /** - * Creates or finds a ConnectedEnvironmentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectedEnvironmentProvisioningState. - */ - @JsonCreator - public static ConnectedEnvironmentProvisioningState fromString(String name) { - return fromString(name, ConnectedEnvironmentProvisioningState.class); - } - - /** - * Gets known ConnectedEnvironmentProvisioningState values. - * - * @return known ConnectedEnvironmentProvisioningState values. - */ - public static Collection values() { - return values(ConnectedEnvironmentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java deleted file mode 100644 index 0b383982af49..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java +++ /dev/null @@ -1,164 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; - -/** An immutable client-side representation of ConnectedEnvironmentStorage. */ -public interface ConnectedEnvironmentStorage { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Storage properties. - * - * @return the properties value. - */ - ConnectedEnvironmentStorageProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner object. - * - * @return the inner object. - */ - ConnectedEnvironmentStorageInner innerModel(); - - /** The entirety of the ConnectedEnvironmentStorage definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The ConnectedEnvironmentStorage definition stages. */ - interface DefinitionStages { - /** The first stage of the ConnectedEnvironmentStorage definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ConnectedEnvironmentStorage definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, connectedEnvironmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @return the next definition stage. - */ - WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); - } - /** - * The stage of the ConnectedEnvironmentStorage definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ConnectedEnvironmentStorage create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ConnectedEnvironmentStorage create(Context context); - } - /** The stage of the ConnectedEnvironmentStorage definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - WithCreate withProperties(ConnectedEnvironmentStorageProperties properties); - } - } - /** - * Begins update for the ConnectedEnvironmentStorage resource. - * - * @return the stage of resource update. - */ - ConnectedEnvironmentStorage.Update update(); - - /** The template for ConnectedEnvironmentStorage update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ConnectedEnvironmentStorage apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ConnectedEnvironmentStorage apply(Context context); - } - /** The ConnectedEnvironmentStorage update stages. */ - interface UpdateStages { - /** The stage of the ConnectedEnvironmentStorage update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - Update withProperties(ConnectedEnvironmentStorageProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ConnectedEnvironmentStorage refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ConnectedEnvironmentStorage refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java deleted file mode 100644 index 199d8dd7ab4f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Storage properties. */ -@Fluent -public final class ConnectedEnvironmentStorageProperties { - /* - * Azure file properties - */ - @JsonProperty(value = "azureFile") - private AzureFileProperties azureFile; - - /** Creates an instance of ConnectedEnvironmentStorageProperties class. */ - public ConnectedEnvironmentStorageProperties() { - } - - /** - * Get the azureFile property: Azure file properties. - * - * @return the azureFile value. - */ - public AzureFileProperties azureFile() { - return this.azureFile; - } - - /** - * Set the azureFile property: Azure file properties. - * - * @param azureFile the azureFile value to set. - * @return the ConnectedEnvironmentStorageProperties object itself. - */ - public ConnectedEnvironmentStorageProperties withAzureFile(AzureFileProperties azureFile) { - this.azureFile = azureFile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureFile() != null) { - azureFile().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java deleted file mode 100644 index 1177335e4438..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java +++ /dev/null @@ -1,26 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import java.util.List; - -/** An immutable client-side representation of ConnectedEnvironmentStoragesCollection. */ -public interface ConnectedEnvironmentStoragesCollection { - /** - * Gets the value property: Collection of storage resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner - * object. - * - * @return the inner object. - */ - ConnectedEnvironmentStoragesCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java deleted file mode 100644 index 74729069dd72..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java +++ /dev/null @@ -1,241 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ConnectedEnvironments. */ -public interface ConnectedEnvironments { - /** - * Get all connectedEnvironments for a subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get all connectedEnvironments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response}. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment. - */ - ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName); - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); - - /** - * Get the properties of an connectedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response}. - */ - ConnectedEnvironment getById(String id); - - /** - * Get the properties of an connectedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an connectedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete an connectedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ConnectedEnvironment resource. - * - * @param name resource name. - * @return the first stage of the new ConnectedEnvironment definition. - */ - ConnectedEnvironment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java deleted file mode 100644 index e0277e08760b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java +++ /dev/null @@ -1,180 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; - -/** Resource collection API of ConnectedEnvironmentsCertificates. */ -public interface ConnectedEnvironmentsCertificates { - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. - */ - Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - Certificate createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. - */ - Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); - - /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - Certificate update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java deleted file mode 100644 index aa40ae8d3ec6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java +++ /dev/null @@ -1,177 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; - -/** Resource collection API of ConnectedEnvironmentsDaprComponents. */ -public interface ConnectedEnvironmentsDaprComponents { - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); - - /** - * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. - */ - DaprComponent createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java deleted file mode 100644 index 0a7d28221974..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java +++ /dev/null @@ -1,155 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ConnectedEnvironmentsStorages. */ -public interface ConnectedEnvironmentsStorages { - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment. - */ - ConnectedEnvironmentStorage get(String resourceGroupName, String connectedEnvironmentName, String storageName); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); - - /** - * Get storage for a connectedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response}. - */ - ConnectedEnvironmentStorage getById(String id); - - /** - * Get storage for a connectedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a connectedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete storage for a connectedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ConnectedEnvironmentStorage resource. - * - * @param name resource name. - * @return the first stage of the new ConnectedEnvironmentStorage definition. - */ - ConnectedEnvironmentStorage.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java deleted file mode 100644 index 24556e20cbe2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ /dev/null @@ -1,105 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App container definition. */ -@Fluent -public final class Container extends BaseContainer { - /* - * List of probes for the container. - */ - @JsonProperty(value = "probes") - private List probes; - - /** Creates an instance of Container class. */ - public Container() { - } - - /** - * Get the probes property: List of probes for the container. - * - * @return the probes value. - */ - public List probes() { - return this.probes; - } - - /** - * Set the probes property: List of probes for the container. - * - * @param probes the probes value to set. - * @return the Container object itself. - */ - public Container withProbes(List probes) { - this.probes = probes; - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withImage(String image) { - super.withImage(image); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withCommand(List command) { - super.withCommand(command); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withArgs(List args) { - super.withArgs(args); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withEnv(List env) { - super.withEnv(env); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withResources(ContainerResources resources) { - super.withResources(resources); - return this; - } - - /** {@inheritDoc} */ - @Override - public Container withVolumeMounts(List volumeMounts) { - super.withVolumeMounts(volumeMounts); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (probes() != null) { - probes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java deleted file mode 100644 index 58433c067706..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ /dev/null @@ -1,505 +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.appcontainers.models; - -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.appcontainers.fluent.models.ContainerAppInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of ContainerApp. */ -public interface ContainerApp { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets the identity property: managed identities for the Container App to interact with other Azure services - * without maintaining any secrets or credentials in code. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - ContainerAppProvisioningState provisioningState(); - - /** - * Gets the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - String managedEnvironmentId(); - - /** - * Gets the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - String environmentId(); - - /** - * Gets the workloadProfileType property: Workload profile type to pin for container app execution. - * - * @return the workloadProfileType value. - */ - String workloadProfileType(); - - /** - * Gets the latestRevisionName property: Name of the latest revision of the Container App. - * - * @return the latestRevisionName value. - */ - String latestRevisionName(); - - /** - * Gets the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - String latestRevisionFqdn(); - - /** - * Gets the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - String customDomainVerificationId(); - - /** - * Gets the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - Configuration configuration(); - - /** - * Gets the template property: Container App versioned application definition. - * - * @return the template value. - */ - Template template(); - - /** - * Gets the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - List outboundIpAddresses(); - - /** - * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - String eventStreamEndpoint(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner object. - * - * @return the inner object. - */ - ContainerAppInner innerModel(); - - /** The entirety of the ContainerApp definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The ContainerApp definition stages. */ - interface DefinitionStages { - /** The first stage of the ContainerApp definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ContainerApp definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the ContainerApp definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the ContainerApp definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithExtendedLocation, - DefinitionStages.WithIdentity, - DefinitionStages.WithManagedEnvironmentId, - DefinitionStages.WithEnvironmentId, - DefinitionStages.WithWorkloadProfileType, - DefinitionStages.WithConfiguration, - DefinitionStages.WithTemplate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ContainerApp create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ContainerApp create(Context context); - } - /** The stage of the ContainerApp definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the ContainerApp definition allowing to specify extendedLocation. */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - /** The stage of the ContainerApp definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: managed identities for the Container App to interact with other Azure - * services without maintaining any secrets or credentials in code.. - * - * @param identity managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ - interface WithManagedEnvironmentId { - /** - * Specifies the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment.. - * - * @param managedEnvironmentId Deprecated. Resource ID of the Container App's environment. - * @return the next definition stage. - */ - WithCreate withManagedEnvironmentId(String managedEnvironmentId); - } - /** The stage of the ContainerApp definition allowing to specify environmentId. */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of environment.. - * - * @param environmentId Resource ID of environment. - * @return the next definition stage. - */ - WithCreate withEnvironmentId(String environmentId); - } - /** The stage of the ContainerApp definition allowing to specify workloadProfileType. */ - interface WithWorkloadProfileType { - /** - * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. - * - * @param workloadProfileType Workload profile type to pin for container app execution. - * @return the next definition stage. - */ - WithCreate withWorkloadProfileType(String workloadProfileType); - } - /** The stage of the ContainerApp definition allowing to specify configuration. */ - interface WithConfiguration { - /** - * Specifies the configuration property: Non versioned Container App configuration properties.. - * - * @param configuration Non versioned Container App configuration properties. - * @return the next definition stage. - */ - WithCreate withConfiguration(Configuration configuration); - } - /** The stage of the ContainerApp definition allowing to specify template. */ - interface WithTemplate { - /** - * Specifies the template property: Container App versioned application definition.. - * - * @param template Container App versioned application definition. - * @return the next definition stage. - */ - WithCreate withTemplate(Template template); - } - } - /** - * Begins update for the ContainerApp resource. - * - * @return the stage of resource update. - */ - ContainerApp.Update update(); - - /** The template for ContainerApp update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithExtendedLocation, - UpdateStages.WithIdentity, - UpdateStages.WithWorkloadProfileType, - UpdateStages.WithConfiguration, - UpdateStages.WithTemplate { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ContainerApp apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ContainerApp apply(Context context); - } - /** The ContainerApp update stages. */ - interface UpdateStages { - /** The stage of the ContainerApp update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the ContainerApp update allowing to specify extendedLocation. */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - /** The stage of the ContainerApp update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: managed identities for the Container App to interact with other Azure - * services without maintaining any secrets or credentials in code.. - * - * @param identity managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the ContainerApp update allowing to specify workloadProfileType. */ - interface WithWorkloadProfileType { - /** - * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. - * - * @param workloadProfileType Workload profile type to pin for container app execution. - * @return the next definition stage. - */ - Update withWorkloadProfileType(String workloadProfileType); - } - /** The stage of the ContainerApp update allowing to specify configuration. */ - interface WithConfiguration { - /** - * Specifies the configuration property: Non versioned Container App configuration properties.. - * - * @param configuration Non versioned Container App configuration properties. - * @return the next definition stage. - */ - Update withConfiguration(Configuration configuration); - } - /** The stage of the ContainerApp update allowing to specify template. */ - interface WithTemplate { - /** - * Specifies the template property: Container App versioned application definition.. - * - * @param template Container App versioned application definition. - * @return the next definition stage. - */ - Update withTemplate(Template template); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ContainerApp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ContainerApp refresh(Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param customHostname Custom hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. - */ - Response listCustomHostnameAnalysisWithResponse( - String customHostname, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis. - */ - CustomHostnameAnalysisResult listCustomHostnameAnalysis(); - - /** - * List secrets for a container app. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List secrets for a container app. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource. - */ - SecretsCollection listSecrets(); - - /** - * Get auth token for a container app. - * - * @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 auth token for a container app along with {@link Response}. - */ - Response getAuthTokenWithResponse(Context context); - - /** - * Get auth token for a container app. - * - * @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 auth token for a container app. - */ - ContainerAppAuthToken getAuthToken(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java deleted file mode 100644 index 8b00db3906e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** An immutable client-side representation of ContainerAppAuthToken. */ -public interface ContainerAppAuthToken { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the token property: Auth token value. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner object. - * - * @return the inner object. - */ - ContainerAppAuthTokenInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java deleted file mode 100644 index a84d9ec65676..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App collection ARM resource. */ -@Fluent -public final class ContainerAppCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ContainerAppCollection class. */ - public ContainerAppCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the ContainerAppCollection object itself. - */ - public ContainerAppCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ContainerAppCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java deleted file mode 100644 index 7b275d050e03..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java +++ /dev/null @@ -1,301 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Probe describes a health check to be performed against a container to determine whether it is alive or ready to - * receive traffic. - */ -@Fluent -public final class ContainerAppProbe { - /* - * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. - * Minimum value is 1. Maximum value is 10. - */ - @JsonProperty(value = "failureThreshold") - private Integer failureThreshold; - - /* - * HTTPGet specifies the http request to perform. - */ - @JsonProperty(value = "httpGet") - private ContainerAppProbeHttpGet httpGet; - - /* - * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. - * Maximum value is 60. - */ - @JsonProperty(value = "initialDelaySeconds") - private Integer initialDelaySeconds; - - /* - * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. - */ - @JsonProperty(value = "periodSeconds") - private Integer periodSeconds; - - /* - * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must - * be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. - */ - @JsonProperty(value = "successThreshold") - private Integer successThreshold; - - /* - * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - */ - @JsonProperty(value = "tcpSocket") - private ContainerAppProbeTcpSocket tcpSocket; - - /* - * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the - * duration in seconds after the processes running in the pod are sent a termination signal and the time when the - * processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your - * process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value - * overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop - * immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling - * ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) - */ - @JsonProperty(value = "terminationGracePeriodSeconds") - private Long terminationGracePeriodSeconds; - - /* - * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is - * 240. - */ - @JsonProperty(value = "timeoutSeconds") - private Integer timeoutSeconds; - - /* - * The type of probe. - */ - @JsonProperty(value = "type") - private Type type; - - /** Creates an instance of ContainerAppProbe class. */ - public ContainerAppProbe() { - } - - /** - * Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * - * @param failureThreshold the failureThreshold value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * Get the httpGet property: HTTPGet specifies the http request to perform. - * - * @return the httpGet value. - */ - public ContainerAppProbeHttpGet httpGet() { - return this.httpGet; - } - - /** - * Set the httpGet property: HTTPGet specifies the http request to perform. - * - * @param httpGet the httpGet value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withHttpGet(ContainerAppProbeHttpGet httpGet) { - this.httpGet = httpGet; - return this; - } - - /** - * Get the initialDelaySeconds property: Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. - * - * @return the initialDelaySeconds value. - */ - public Integer initialDelaySeconds() { - return this.initialDelaySeconds; - } - - /** - * Set the initialDelaySeconds property: Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. - * - * @param initialDelaySeconds the initialDelaySeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withInitialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds = initialDelaySeconds; - return this; - } - - /** - * Get the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value - * is 1. Maximum value is 240. - * - * @return the periodSeconds value. - */ - public Integer periodSeconds() { - return this.periodSeconds; - } - - /** - * Set the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value - * is 1. Maximum value is 240. - * - * @param periodSeconds the periodSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; - return this; - } - - /** - * Get the successThreshold property: Minimum consecutive successes for the probe to be considered successful after - * having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. - * - * @return the successThreshold value. - */ - public Integer successThreshold() { - return this.successThreshold; - } - - /** - * Set the successThreshold property: Minimum consecutive successes for the probe to be considered successful after - * having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. - * - * @param successThreshold the successThreshold value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * - * @return the tcpSocket value. - */ - public ContainerAppProbeTcpSocket tcpSocket() { - return this.tcpSocket; - } - - /** - * Set the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * - * @param tcpSocket the tcpSocket value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTcpSocket(ContainerAppProbeTcpSocket tcpSocket) { - this.tcpSocket = tcpSocket; - return this; - } - - /** - * Get the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod - * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - * value longer than the expected cleanup time for your process. If this value is nil, the pod's - * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity - * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum - * value is 3600 seconds (1 hour). - * - * @return the terminationGracePeriodSeconds value. - */ - public Long terminationGracePeriodSeconds() { - return this.terminationGracePeriodSeconds; - } - - /** - * Set the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod - * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - * value longer than the expected cleanup time for your process. If this value is nil, the pod's - * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity - * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum - * value is 3600 seconds (1 hour). - * - * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; - return this; - } - - /** - * Get the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum - * value is 1. Maximum value is 240. - * - * @return the timeoutSeconds value. - */ - public Integer timeoutSeconds() { - return this.timeoutSeconds; - } - - /** - * Set the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum - * value is 1. Maximum value is 240. - * - * @param timeoutSeconds the timeoutSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; - return this; - } - - /** - * Get the type property: The type of probe. - * - * @return the type value. - */ - public Type type() { - return this.type; - } - - /** - * Set the type property: The type of probe. - * - * @param type the type value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withType(Type type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpGet() != null) { - httpGet().validate(); - } - if (tcpSocket() != null) { - tcpSocket().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java deleted file mode 100644 index e02fc6655783..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java +++ /dev/null @@ -1,163 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** HTTPGet specifies the http request to perform. */ -@Fluent -public final class ContainerAppProbeHttpGet { - /* - * Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - */ - @JsonProperty(value = "host") - private String host; - - /* - * Custom headers to set in the request. HTTP allows repeated headers. - */ - @JsonProperty(value = "httpHeaders") - private List httpHeaders; - - /* - * Path to access on the HTTP server. - */ - @JsonProperty(value = "path") - private String path; - - /* - * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an - * IANA_SVC_NAME. - */ - @JsonProperty(value = "port", required = true) - private int port; - - /* - * Scheme to use for connecting to the host. Defaults to HTTP. - */ - @JsonProperty(value = "scheme") - private Scheme scheme; - - /** Creates an instance of ContainerAppProbeHttpGet class. */ - public ContainerAppProbeHttpGet() { - } - - /** - * Get the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in - * httpHeaders instead. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in - * httpHeaders instead. - * - * @param host the host value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * - * @return the httpHeaders value. - */ - public List httpHeaders() { - return this.httpHeaders; - } - - /** - * Set the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * - * @param httpHeaders the httpHeaders value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withHttpHeaders(List httpHeaders) { - this.httpHeaders = httpHeaders; - return this; - } - - /** - * Get the path property: Path to access on the HTTP server. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Path to access on the HTTP server. - * - * @param path the path value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the port property: Name or number of the port to access on the container. Number must be in the range 1 to - * 65535. Name must be an IANA_SVC_NAME. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: Name or number of the port to access on the container. Number must be in the range 1 to - * 65535. Name must be an IANA_SVC_NAME. - * - * @param port the port value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withPort(int port) { - this.port = port; - return this; - } - - /** - * Get the scheme property: Scheme to use for connecting to the host. Defaults to HTTP. - * - * @return the scheme value. - */ - public Scheme scheme() { - return this.scheme; - } - - /** - * Set the scheme property: Scheme to use for connecting to the host. Defaults to HTTP. - * - * @param scheme the scheme value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withScheme(Scheme scheme) { - this.scheme = scheme; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpHeaders() != null) { - httpHeaders().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java deleted file mode 100644 index b722bc0e1365..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java +++ /dev/null @@ -1,91 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** HTTPHeader describes a custom header to be used in HTTP probes. */ -@Fluent -public final class ContainerAppProbeHttpGetHttpHeadersItem { - /* - * The header field name - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The header field value - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** Creates an instance of ContainerAppProbeHttpGetHttpHeadersItem class. */ - public ContainerAppProbeHttpGetHttpHeadersItem() { - } - - /** - * Get the name property: The header field name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The header field name. - * - * @param name the name value to set. - * @return the ContainerAppProbeHttpGetHttpHeadersItem object itself. - */ - public ContainerAppProbeHttpGetHttpHeadersItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The header field value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The header field value. - * - * @param value the value value to set. - * @return the ContainerAppProbeHttpGetHttpHeadersItem object itself. - */ - public ContainerAppProbeHttpGetHttpHeadersItem withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model ContainerAppProbeHttpGetHttpHeadersItem")); - } - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ContainerAppProbeHttpGetHttpHeadersItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppProbeHttpGetHttpHeadersItem.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java deleted file mode 100644 index 617a498af181..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java +++ /dev/null @@ -1,79 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ -@Fluent -public final class ContainerAppProbeTcpSocket { - /* - * Optional: Host name to connect to, defaults to the pod IP. - */ - @JsonProperty(value = "host") - private String host; - - /* - * Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an - * IANA_SVC_NAME. - */ - @JsonProperty(value = "port", required = true) - private int port; - - /** Creates an instance of ContainerAppProbeTcpSocket class. */ - public ContainerAppProbeTcpSocket() { - } - - /** - * Get the host property: Optional: Host name to connect to, defaults to the pod IP. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: Optional: Host name to connect to, defaults to the pod IP. - * - * @param host the host value to set. - * @return the ContainerAppProbeTcpSocket object itself. - */ - public ContainerAppProbeTcpSocket withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the port property: Number or name of the port to access on the container. Number must be in the range 1 to - * 65535. Name must be an IANA_SVC_NAME. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: Number or name of the port to access on the container. Number must be in the range 1 to - * 65535. Name must be an IANA_SVC_NAME. - * - * @param port the port value to set. - * @return the ContainerAppProbeTcpSocket object itself. - */ - public ContainerAppProbeTcpSocket withPort(int port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java deleted file mode 100644 index f1b0dfdbda2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java +++ /dev/null @@ -1,47 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Provisioning state of the Container App. */ -public final class ContainerAppProvisioningState extends ExpandableStringEnum { - /** Static value InProgress for ContainerAppProvisioningState. */ - public static final ContainerAppProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** Static value Succeeded for ContainerAppProvisioningState. */ - public static final ContainerAppProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ContainerAppProvisioningState. */ - public static final ContainerAppProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ContainerAppProvisioningState. */ - public static final ContainerAppProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Deleting for ContainerAppProvisioningState. */ - public static final ContainerAppProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates or finds a ContainerAppProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerAppProvisioningState. - */ - @JsonCreator - public static ContainerAppProvisioningState fromString(String name) { - return fromString(name, ContainerAppProvisioningState.class); - } - - /** - * Gets known ContainerAppProvisioningState values. - * - * @return known ContainerAppProvisioningState values. - */ - public static Collection values() { - return values(ContainerAppProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java deleted file mode 100644 index 8b238d6111b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java +++ /dev/null @@ -1,54 +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.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App Secret. */ -@Immutable -public final class ContainerAppSecret { - /* - * Secret Name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Secret Value. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /** Creates an instance of ContainerAppSecret class. */ - public ContainerAppSecret() { - } - - /** - * Get the name property: Secret Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: Secret Value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java deleted file mode 100644 index f7db26106a58..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java +++ /dev/null @@ -1,280 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; - -/** Resource collection API of ContainerApps. */ -public interface ContainerApps { - /** - * Get the Container Apps in a given subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get the Container Apps in a given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String containerAppName, Context context); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. - */ - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis. - */ - CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource. - */ - SecretsCollection listSecrets(String resourceGroupName, String containerAppName); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app along with {@link Response}. - */ - Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 auth token for a container app. - */ - ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName); - - /** - * Get the properties of a Container App. - * - * @param id the resource ID. - * @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 properties of a Container App along with {@link Response}. - */ - ContainerApp getById(String id); - - /** - * Get the properties of a Container App. - * - * @param id the resource ID. - * @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 properties of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Container App. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ContainerApp resource. - * - * @param name resource name. - * @return the first stage of the new ContainerApp definition. - */ - ContainerApp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java deleted file mode 100644 index 09373e21dca1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java +++ /dev/null @@ -1,155 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ContainerAppsAuthConfigs. */ -public interface ContainerAppsAuthConfigs { - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. - */ - AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String containerAppName, String authConfigName); - - /** - * Get a AuthConfig of a Container App. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - AuthConfig getById(String id); - - /** - * Get a AuthConfig of a Container App. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App AuthConfig. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Container App AuthConfig. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AuthConfig resource. - * - * @param name resource name. - * @return the first stage of the new AuthConfig definition. - */ - AuthConfig.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java deleted file mode 100644 index 977b6d530baa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ContainerAppsDiagnostics. */ -public interface ContainerAppsDiagnostics { - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String containerAppName); - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response}. - */ - Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App. - */ - Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App along with {@link Response}. - */ - Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 properties of a Container App. - */ - ContainerApp getRoot(String resourceGroupName, String containerAppName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java deleted file mode 100644 index 221ffd8e23ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java +++ /dev/null @@ -1,73 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ContainerAppsRevisionReplicas. */ -public interface ContainerAppsRevisionReplicas { - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response}. - */ - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); - - /** - * Get a replica for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision. - */ - Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource along with {@link Response}. - */ - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * List replicas for a Container App Revision. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Revision Replicas collection ARM resource. - */ - ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java deleted file mode 100644 index 4d6a333e6fb6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java +++ /dev/null @@ -1,158 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ContainerAppsRevisions. */ -public interface ContainerAppsRevisions { - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Get a revision of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Activates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void activateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Deactivates a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); - - /** - * Restarts a revision for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restartRevision(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java deleted file mode 100644 index 1506120e596a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java +++ /dev/null @@ -1,154 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ContainerAppsSourceControls. */ -public interface ContainerAppsSourceControls { - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. - */ - SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - SourceControl getById(String id); - - /** - * Get a SourceControl of a Container App. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App SourceControl. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Container App SourceControl. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new SourceControl resource. - * - * @param name resource name. - * @return the first stage of the new SourceControl definition. - */ - SourceControl.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java deleted file mode 100644 index 2daecab42dbe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java +++ /dev/null @@ -1,91 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App container resource requirements. */ -@Fluent -public final class ContainerResources { - /* - * Required CPU in cores, e.g. 0.5 - */ - @JsonProperty(value = "cpu") - private Double cpu; - - /* - * Required memory, e.g. "250Mb" - */ - @JsonProperty(value = "memory") - private String memory; - - /* - * Ephemeral Storage, e.g. "1Gi" - */ - @JsonProperty(value = "ephemeralStorage", access = JsonProperty.Access.WRITE_ONLY) - private String ephemeralStorage; - - /** Creates an instance of ContainerResources class. */ - public ContainerResources() { - } - - /** - * Get the cpu property: Required CPU in cores, e.g. 0.5. - * - * @return the cpu value. - */ - public Double cpu() { - return this.cpu; - } - - /** - * Set the cpu property: Required CPU in cores, e.g. 0.5. - * - * @param cpu the cpu value to set. - * @return the ContainerResources object itself. - */ - public ContainerResources withCpu(Double cpu) { - this.cpu = cpu; - return this; - } - - /** - * Get the memory property: Required memory, e.g. "250Mb". - * - * @return the memory value. - */ - public String memory() { - return this.memory; - } - - /** - * Set the memory property: Required memory, e.g. "250Mb". - * - * @param memory the memory value to set. - * @return the ContainerResources object itself. - */ - public ContainerResources withMemory(String memory) { - this.memory = memory; - return this; - } - - /** - * Get the ephemeralStorage property: Ephemeral Storage, e.g. "1Gi". - * - * @return the ephemeralStorage value. - */ - public String ephemeralStorage() { - return this.ephemeralStorage; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java deleted file mode 100644 index 3eb091b10ed5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the session cookie's expiration. */ -@Fluent -public final class CookieExpiration { - /* - * The convention used when determining the session cookie's expiration. - */ - @JsonProperty(value = "convention") - private CookieExpirationConvention convention; - - /* - * The time after the request is made when the session cookie should expire. - */ - @JsonProperty(value = "timeToExpiration") - private String timeToExpiration; - - /** Creates an instance of CookieExpiration class. */ - public CookieExpiration() { - } - - /** - * Get the convention property: The convention used when determining the session cookie's expiration. - * - * @return the convention value. - */ - public CookieExpirationConvention convention() { - return this.convention; - } - - /** - * Set the convention property: The convention used when determining the session cookie's expiration. - * - * @param convention the convention value to set. - * @return the CookieExpiration object itself. - */ - public CookieExpiration withConvention(CookieExpirationConvention convention) { - this.convention = convention; - return this; - } - - /** - * Get the timeToExpiration property: The time after the request is made when the session cookie should expire. - * - * @return the timeToExpiration value. - */ - public String timeToExpiration() { - return this.timeToExpiration; - } - - /** - * Set the timeToExpiration property: The time after the request is made when the session cookie should expire. - * - * @param timeToExpiration the timeToExpiration value to set. - * @return the CookieExpiration object itself. - */ - public CookieExpiration withTimeToExpiration(String timeToExpiration) { - this.timeToExpiration = timeToExpiration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java deleted file mode 100644 index defc5483b6e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java +++ /dev/null @@ -1,51 +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.appcontainers.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The convention used when determining the session cookie's expiration. */ -public enum CookieExpirationConvention { - /** Enum value FixedTime. */ - FIXED_TIME("FixedTime"), - - /** Enum value IdentityProviderDerived. */ - IDENTITY_PROVIDER_DERIVED("IdentityProviderDerived"); - - /** The actual serialized value for a CookieExpirationConvention instance. */ - private final String value; - - CookieExpirationConvention(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CookieExpirationConvention instance. - * - * @param value the serialized value to parse. - * @return the parsed CookieExpirationConvention object, or null if unable to parse. - */ - @JsonCreator - public static CookieExpirationConvention fromString(String value) { - if (value == null) { - return null; - } - CookieExpirationConvention[] items = CookieExpirationConvention.values(); - for (CookieExpirationConvention item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java deleted file mode 100644 index c7e9540e075d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java +++ /dev/null @@ -1,117 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Custom Domain of a Container App. */ -@Fluent -public final class CustomDomain { - /* - * Hostname. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Custom Domain binding type. - */ - @JsonProperty(value = "bindingType") - private BindingType bindingType; - - /* - * Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. - */ - @JsonProperty(value = "certificateId", required = true) - private String certificateId; - - /** Creates an instance of CustomDomain class. */ - public CustomDomain() { - } - - /** - * Get the name property: Hostname. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Hostname. - * - * @param name the name value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withName(String name) { - this.name = name; - return this; - } - - /** - * Get the bindingType property: Custom Domain binding type. - * - * @return the bindingType value. - */ - public BindingType bindingType() { - return this.bindingType; - } - - /** - * Set the bindingType property: Custom Domain binding type. - * - * @param bindingType the bindingType value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withBindingType(BindingType bindingType) { - this.bindingType = bindingType; - return this; - } - - /** - * Get the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the - * Managed Environment. - * - * @return the certificateId value. - */ - public String certificateId() { - return this.certificateId; - } - - /** - * Set the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the - * Managed Environment. - * - * @param certificateId the certificateId value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withCertificateId(String certificateId) { - this.certificateId = certificateId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model CustomDomain")); - } - if (certificateId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property certificateId in model CustomDomain")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomDomain.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java deleted file mode 100644 index 2c403bd755ed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java +++ /dev/null @@ -1,164 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Configuration properties for apps environment custom domain. */ -@Fluent -public final class CustomDomainConfiguration { - /* - * Id used to verify domain name ownership - */ - @JsonProperty(value = "customDomainVerificationId", access = JsonProperty.Access.WRITE_ONLY) - private String customDomainVerificationId; - - /* - * Dns suffix for the environment domain - */ - @JsonProperty(value = "dnsSuffix") - private String dnsSuffix; - - /* - * PFX or PEM blob - */ - @JsonProperty(value = "certificateValue") - private byte[] certificateValue; - - /* - * Certificate password - */ - @JsonProperty(value = "certificatePassword") - private byte[] certificatePassword; - - /* - * Certificate expiration date. - */ - @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expirationDate; - - /* - * Certificate thumbprint. - */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) - private String thumbprint; - - /* - * Subject name of the certificate. - */ - @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) - private String subjectName; - - /** Creates an instance of CustomDomainConfiguration class. */ - public CustomDomainConfiguration() { - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.customDomainVerificationId; - } - - /** - * Get the dnsSuffix property: Dns suffix for the environment domain. - * - * @return the dnsSuffix value. - */ - public String dnsSuffix() { - return this.dnsSuffix; - } - - /** - * Set the dnsSuffix property: Dns suffix for the environment domain. - * - * @param dnsSuffix the dnsSuffix value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withDnsSuffix(String dnsSuffix) { - this.dnsSuffix = dnsSuffix; - return this; - } - - /** - * Get the certificateValue property: PFX or PEM blob. - * - * @return the certificateValue value. - */ - public byte[] certificateValue() { - return CoreUtils.clone(this.certificateValue); - } - - /** - * Set the certificateValue property: PFX or PEM blob. - * - * @param certificateValue the certificateValue value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { - this.certificateValue = CoreUtils.clone(certificateValue); - return this; - } - - /** - * Get the certificatePassword property: Certificate password. - * - * @return the certificatePassword value. - */ - public byte[] certificatePassword() { - return CoreUtils.clone(this.certificatePassword); - } - - /** - * Set the certificatePassword property: Certificate password. - * - * @param certificatePassword the certificatePassword value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withCertificatePassword(byte[] certificatePassword) { - this.certificatePassword = CoreUtils.clone(certificatePassword); - return this; - } - - /** - * Get the expirationDate property: Certificate expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the thumbprint property: Certificate thumbprint. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Get the subjectName property: Subject name of the certificate. - * - * @return the subjectName value. - */ - public String subjectName() { - return this.subjectName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java deleted file mode 100644 index e80ffbb899cf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java +++ /dev/null @@ -1,106 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import java.util.List; - -/** An immutable client-side representation of CustomHostnameAnalysisResult. */ -public interface CustomHostnameAnalysisResult { - /** - * Gets the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - String hostname(); - - /** - * Gets the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - Boolean isHostnameAlreadyVerified(); - - /** - * Gets the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - DnsVerificationTestResult customDomainVerificationTest(); - - /** - * Gets the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); - - /** - * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the - * Container App's managed environment; otherwise, <code>false</code>. - * - * @return the hasConflictOnManagedEnvironment value. - */ - Boolean hasConflictOnManagedEnvironment(); - - /** - * Gets the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on - * the Container App's managed environment level custom domain; otherwise, <code>false</code>. - * - * @return the conflictWithEnvironmentCustomDomain value. - */ - Boolean conflictWithEnvironmentCustomDomain(); - - /** - * Gets the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed - * Environment if it's within the same subscription. - * - * @return the conflictingContainerAppResourceId value. - */ - String conflictingContainerAppResourceId(); - - /** - * Gets the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - List cNameRecords(); - - /** - * Gets the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - List txtRecords(); - - /** - * Gets the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - List aRecords(); - - /** - * Gets the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - List alternateCNameRecords(); - - /** - * Gets the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - List alternateTxtRecords(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner object. - * - * @return the inner object. - */ - CustomHostnameAnalysisResultInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java deleted file mode 100644 index 981f2943541f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java +++ /dev/null @@ -1,100 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Raw failure information if DNS verification fails. */ -@Fluent -public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { - /* - * Standardized string to programmatically identify the error. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /* - * Detailed error description and debugging information. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /* - * Detailed error description and debugging information. - */ - @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) - private String target; - - /* - * Details or the error - */ - @JsonProperty(value = "details") - private List details; - - /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo class. */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo() { - } - - /** - * Get the code property: Standardized string to programmatically identify the error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Detailed error description and debugging information. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the target property: Detailed error description and debugging information. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Get the details property: Details or the error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: Details or the error. - * - * @param details the details value to set. - * @return the CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo object itself. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo withDetails( - List details) { - this.details = details; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java deleted file mode 100644 index 8324c64c41af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java +++ /dev/null @@ -1,69 +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.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Detailed errors. */ -@Immutable -public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { - /* - * Standardized string to programmatically identify the error. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /* - * Detailed error description and debugging information. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /* - * Detailed error description and debugging information. - */ - @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) - private String target; - - /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem class. */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem() { - } - - /** - * Get the code property: Standardized string to programmatically identify the error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Detailed error description and debugging information. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the target property: Detailed error description and debugging information. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java deleted file mode 100644 index 12afd42c402d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java +++ /dev/null @@ -1,112 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the custom Open ID Connect provider. */ -@Fluent -public final class CustomOpenIdConnectProvider { - /* - * false if the custom Open ID provider provider should not be enabled; otherwise, true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the app registration for the custom Open ID Connect provider. - */ - @JsonProperty(value = "registration") - private OpenIdConnectRegistration registration; - - /* - * The configuration settings of the login flow of the custom Open ID Connect provider. - */ - @JsonProperty(value = "login") - private OpenIdConnectLogin login; - - /** Creates an instance of CustomOpenIdConnectProvider class. */ - public CustomOpenIdConnectProvider() { - } - - /** - * Get the enabled property: <code>false</code> if the custom Open ID provider provider should not be - * enabled; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the custom Open ID provider provider should not be - * enabled; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the custom Open ID Connect - * provider. - * - * @return the registration value. - */ - public OpenIdConnectRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the custom Open ID Connect - * provider. - * - * @param registration the registration value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withRegistration(OpenIdConnectRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * - * @return the login value. - */ - public OpenIdConnectLogin login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * - * @param login the login value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withLogin(OpenIdConnectLogin login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java deleted file mode 100644 index a3adaf102f25..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ /dev/null @@ -1,110 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Container App container Custom scaling rule. */ -@Fluent -public final class CustomScaleRule { - /* - * Type of the custom scale rule - * eg: azure-servicebus, redis etc. - */ - @JsonProperty(value = "type") - private String type; - - /* - * Metadata properties to describe custom scale rule. - */ - @JsonProperty(value = "metadata") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map metadata; - - /* - * Authentication secrets for the custom scale rule. - */ - @JsonProperty(value = "auth") - private List auth; - - /** Creates an instance of CustomScaleRule class. */ - public CustomScaleRule() { - } - - /** - * Get the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. - * - * @param type the type value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withType(String type) { - this.type = type; - return this; - } - - /** - * Get the metadata property: Metadata properties to describe custom scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe custom scale rule. - * - * @param metadata the metadata value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the custom scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the custom scale rule. - * - * @param auth the auth value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withAuth(List auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java deleted file mode 100644 index 9d378cd0ee73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java +++ /dev/null @@ -1,241 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App Dapr configuration. */ -@Fluent -public final class Dapr { - /* - * Boolean indicating if the Dapr side car is enabled - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * Dapr application identifier - */ - @JsonProperty(value = "appId") - private String appId; - - /* - * Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http - */ - @JsonProperty(value = "appProtocol") - private AppProtocol appProtocol; - - /* - * Tells Dapr which port your application is listening on - */ - @JsonProperty(value = "appPort") - private Integer appPort; - - /* - * Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. - */ - @JsonProperty(value = "httpReadBufferSize") - private Integer httpReadBufferSize; - - /* - * Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. - * Default is 4 MB. - */ - @JsonProperty(value = "httpMaxRequestSize") - private Integer httpMaxRequestSize; - - /* - * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. - */ - @JsonProperty(value = "logLevel") - private LogLevel logLevel; - - /* - * Enables API logging for the Dapr sidecar - */ - @JsonProperty(value = "enableApiLogging") - private Boolean enableApiLogging; - - /** Creates an instance of Dapr class. */ - public Dapr() { - } - - /** - * Get the enabled property: Boolean indicating if the Dapr side car is enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Boolean indicating if the Dapr side car is enabled. - * - * @param enabled the enabled value to set. - * @return the Dapr object itself. - */ - public Dapr withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the appId property: Dapr application identifier. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId property: Dapr application identifier. - * - * @param appId the appId value to set. - * @return the Dapr object itself. - */ - public Dapr withAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Get the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and - * grpc. Default is http. - * - * @return the appProtocol value. - */ - public AppProtocol appProtocol() { - return this.appProtocol; - } - - /** - * Set the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and - * grpc. Default is http. - * - * @param appProtocol the appProtocol value to set. - * @return the Dapr object itself. - */ - public Dapr withAppProtocol(AppProtocol appProtocol) { - this.appProtocol = appProtocol; - return this; - } - - /** - * Get the appPort property: Tells Dapr which port your application is listening on. - * - * @return the appPort value. - */ - public Integer appPort() { - return this.appPort; - } - - /** - * Set the appPort property: Tells Dapr which port your application is listening on. - * - * @param appPort the appPort value to set. - * @return the Dapr object itself. - */ - public Dapr withAppPort(Integer appPort) { - this.appPort = appPort; - return this; - } - - /** - * Get the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending - * multi-KB headers. Default is 65KB. - * - * @return the httpReadBufferSize value. - */ - public Integer httpReadBufferSize() { - return this.httpReadBufferSize; - } - - /** - * Set the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending - * multi-KB headers. Default is 65KB. - * - * @param httpReadBufferSize the httpReadBufferSize value to set. - * @return the Dapr object itself. - */ - public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { - this.httpReadBufferSize = httpReadBufferSize; - return this; - } - - /** - * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to - * handle uploading of big files. Default is 4 MB. - * - * @return the httpMaxRequestSize value. - */ - public Integer httpMaxRequestSize() { - return this.httpMaxRequestSize; - } - - /** - * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to - * handle uploading of big files. Default is 4 MB. - * - * @param httpMaxRequestSize the httpMaxRequestSize value to set. - * @return the Dapr object itself. - */ - public Dapr withHttpMaxRequestSize(Integer httpMaxRequestSize) { - this.httpMaxRequestSize = httpMaxRequestSize; - return this; - } - - /** - * Get the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. - * Default is info. - * - * @return the logLevel value. - */ - public LogLevel logLevel() { - return this.logLevel; - } - - /** - * Set the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. - * Default is info. - * - * @param logLevel the logLevel value to set. - * @return the Dapr object itself. - */ - public Dapr withLogLevel(LogLevel logLevel) { - this.logLevel = logLevel; - return this; - } - - /** - * Get the enableApiLogging property: Enables API logging for the Dapr sidecar. - * - * @return the enableApiLogging value. - */ - public Boolean enableApiLogging() { - return this.enableApiLogging; - } - - /** - * Set the enableApiLogging property: Enables API logging for the Dapr sidecar. - * - * @param enableApiLogging the enableApiLogging value to set. - * @return the Dapr object itself. - */ - public Dapr withEnableApiLogging(Boolean enableApiLogging) { - this.enableApiLogging = enableApiLogging; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java deleted file mode 100644 index b8d6168c573d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ /dev/null @@ -1,393 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import java.util.List; - -/** An immutable client-side representation of DaprComponent. */ -public interface DaprComponent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the componentType property: Component type. - * - * @return the componentType value. - */ - String componentType(); - - /** - * Gets the version property: Component version. - * - * @return the version value. - */ - String version(); - - /** - * Gets the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - Boolean ignoreErrors(); - - /** - * Gets the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - String initTimeout(); - - /** - * Gets the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - List secrets(); - - /** - * Gets the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - String secretStoreComponent(); - - /** - * Gets the metadata property: Component metadata. - * - * @return the metadata value. - */ - List metadata(); - - /** - * Gets the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - List scopes(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner object. - * - * @return the inner object. - */ - DaprComponentInner innerModel(); - - /** The entirety of the DaprComponent definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The DaprComponent definition stages. */ - interface DefinitionStages { - /** The first stage of the DaprComponent definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DaprComponent definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - /** - * The stage of the DaprComponent definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithComponentType, - DefinitionStages.WithVersion, - DefinitionStages.WithIgnoreErrors, - DefinitionStages.WithInitTimeout, - DefinitionStages.WithSecrets, - DefinitionStages.WithSecretStoreComponent, - DefinitionStages.WithMetadata, - DefinitionStages.WithScopes { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprComponent create(Context context); - } - /** The stage of the DaprComponent definition allowing to specify componentType. */ - interface WithComponentType { - /** - * Specifies the componentType property: Component type. - * - * @param componentType Component type. - * @return the next definition stage. - */ - WithCreate withComponentType(String componentType); - } - /** The stage of the DaprComponent definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Component version. - * - * @param version Component version. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - /** The stage of the DaprComponent definition allowing to specify ignoreErrors. */ - interface WithIgnoreErrors { - /** - * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors Boolean describing if the component errors are ignores. - * @return the next definition stage. - */ - WithCreate withIgnoreErrors(Boolean ignoreErrors); - } - /** The stage of the DaprComponent definition allowing to specify initTimeout. */ - interface WithInitTimeout { - /** - * Specifies the initTimeout property: Initialization timeout. - * - * @param initTimeout Initialization timeout. - * @return the next definition stage. - */ - WithCreate withInitTimeout(String initTimeout); - } - /** The stage of the DaprComponent definition allowing to specify secrets. */ - interface WithSecrets { - /** - * Specifies the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets Collection of secrets used by a Dapr component. - * @return the next definition stage. - */ - WithCreate withSecrets(List secrets); - } - /** The stage of the DaprComponent definition allowing to specify secretStoreComponent. */ - interface WithSecretStoreComponent { - /** - * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. - * @return the next definition stage. - */ - WithCreate withSecretStoreComponent(String secretStoreComponent); - } - /** The stage of the DaprComponent definition allowing to specify metadata. */ - interface WithMetadata { - /** - * Specifies the metadata property: Component metadata. - * - * @param metadata Component metadata. - * @return the next definition stage. - */ - WithCreate withMetadata(List metadata); - } - /** The stage of the DaprComponent definition allowing to specify scopes. */ - interface WithScopes { - /** - * Specifies the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes Names of container apps that can use this Dapr component. - * @return the next definition stage. - */ - WithCreate withScopes(List scopes); - } - } - /** - * Begins update for the DaprComponent resource. - * - * @return the stage of resource update. - */ - DaprComponent.Update update(); - - /** The template for DaprComponent update. */ - interface Update - extends UpdateStages.WithComponentType, - UpdateStages.WithVersion, - UpdateStages.WithIgnoreErrors, - UpdateStages.WithInitTimeout, - UpdateStages.WithSecrets, - UpdateStages.WithSecretStoreComponent, - UpdateStages.WithMetadata, - UpdateStages.WithScopes { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprComponent apply(Context context); - } - /** The DaprComponent update stages. */ - interface UpdateStages { - /** The stage of the DaprComponent update allowing to specify componentType. */ - interface WithComponentType { - /** - * Specifies the componentType property: Component type. - * - * @param componentType Component type. - * @return the next definition stage. - */ - Update withComponentType(String componentType); - } - /** The stage of the DaprComponent update allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Component version. - * - * @param version Component version. - * @return the next definition stage. - */ - Update withVersion(String version); - } - /** The stage of the DaprComponent update allowing to specify ignoreErrors. */ - interface WithIgnoreErrors { - /** - * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors Boolean describing if the component errors are ignores. - * @return the next definition stage. - */ - Update withIgnoreErrors(Boolean ignoreErrors); - } - /** The stage of the DaprComponent update allowing to specify initTimeout. */ - interface WithInitTimeout { - /** - * Specifies the initTimeout property: Initialization timeout. - * - * @param initTimeout Initialization timeout. - * @return the next definition stage. - */ - Update withInitTimeout(String initTimeout); - } - /** The stage of the DaprComponent update allowing to specify secrets. */ - interface WithSecrets { - /** - * Specifies the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets Collection of secrets used by a Dapr component. - * @return the next definition stage. - */ - Update withSecrets(List secrets); - } - /** The stage of the DaprComponent update allowing to specify secretStoreComponent. */ - interface WithSecretStoreComponent { - /** - * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. - * @return the next definition stage. - */ - Update withSecretStoreComponent(String secretStoreComponent); - } - /** The stage of the DaprComponent update allowing to specify metadata. */ - interface WithMetadata { - /** - * Specifies the metadata property: Component metadata. - * - * @param metadata Component metadata. - * @return the next definition stage. - */ - Update withMetadata(List metadata); - } - /** The stage of the DaprComponent update allowing to specify scopes. */ - interface WithScopes { - /** - * Specifies the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes Names of container apps that can use this Dapr component. - * @return the next definition stage. - */ - Update withScopes(List scopes); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprComponent refresh(Context context); - - /** - * List secrets for a dapr component. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List secrets for a dapr component. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java deleted file mode 100644 index 43295443f0f0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of DaprComponents. */ -public interface DaprComponents { - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - DaprComponent get(String resourceGroupName, String environmentName, String componentName); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String environmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - DaprComponent getById(String id); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponent resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponent definition. - */ - DaprComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java deleted file mode 100644 index e3d61a519a55..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Dapr Components ARM resource. */ -@Fluent -public final class DaprComponentsCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of DaprComponentsCollection class. */ - public DaprComponentsCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the DaprComponentsCollection object itself. - */ - public DaprComponentsCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DaprComponentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentsCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java deleted file mode 100644 index 41e6d4e7d8b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dapr component metadata. */ -@Fluent -public final class DaprMetadata { - /* - * Metadata property name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Metadata property value. - */ - @JsonProperty(value = "value") - private String value; - - /* - * Name of the Dapr Component secret from which to pull the metadata property value. - */ - @JsonProperty(value = "secretRef") - private String secretRef; - - /** Creates an instance of DaprMetadata class. */ - public DaprMetadata() { - } - - /** - * Get the name property: Metadata property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Metadata property name. - * - * @param name the name value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Metadata property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Metadata property value. - * - * @param value the value value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * - * @param secretRef the secretRef value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java deleted file mode 100644 index 3855936a9a9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java +++ /dev/null @@ -1,25 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import java.util.List; - -/** An immutable client-side representation of DaprSecretsCollection. */ -public interface DaprSecretsCollection { - /** - * Gets the value property: Collection of secrets used by a Dapr component. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner object. - * - * @return the inner object. - */ - DaprSecretsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java deleted file mode 100644 index 701357e0e217..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java +++ /dev/null @@ -1,82 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the Azure Active Directory default authorization policy. */ -@Fluent -public final class DefaultAuthorizationPolicy { - /* - * The configuration settings of the Azure Active Directory allowed principals. - */ - @JsonProperty(value = "allowedPrincipals") - private AllowedPrincipals allowedPrincipals; - - /* - * The configuration settings of the Azure Active Directory allowed applications. - */ - @JsonProperty(value = "allowedApplications") - private List allowedApplications; - - /** Creates an instance of DefaultAuthorizationPolicy class. */ - public DefaultAuthorizationPolicy() { - } - - /** - * Get the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * - * @return the allowedPrincipals value. - */ - public AllowedPrincipals allowedPrincipals() { - return this.allowedPrincipals; - } - - /** - * Set the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * - * @param allowedPrincipals the allowedPrincipals value to set. - * @return the DefaultAuthorizationPolicy object itself. - */ - public DefaultAuthorizationPolicy withAllowedPrincipals(AllowedPrincipals allowedPrincipals) { - this.allowedPrincipals = allowedPrincipals; - return this; - } - - /** - * Get the allowedApplications property: The configuration settings of the Azure Active Directory allowed - * applications. - * - * @return the allowedApplications value. - */ - public List allowedApplications() { - return this.allowedApplications; - } - - /** - * Set the allowedApplications property: The configuration settings of the Azure Active Directory allowed - * applications. - * - * @param allowedApplications the allowedApplications value to set. - * @return the DefaultAuthorizationPolicy object itself. - */ - public DefaultAuthorizationPolicy withAllowedApplications(List allowedApplications) { - this.allowedApplications = allowedApplications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (allowedPrincipals() != null) { - allowedPrincipals().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java deleted file mode 100644 index 0fd4fc04d333..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.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.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** App Service error response. */ -@Immutable -public final class DefaultErrorResponseError extends ManagementError { - /* - * More information to debug error. - */ - @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) - private String innererror; - - /** Creates an instance of DefaultErrorResponseError class. */ - public DefaultErrorResponseError() { - } - - /** - * Get the innererror property: More information to debug error. - * - * @return the innererror value. - */ - public String getInnererror() { - return this.innererror; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java deleted file mode 100644 index 9cfd6edb3258..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** Exception thrown for an invalid response with DefaultErrorResponseError information. */ -public final class DefaultErrorResponseErrorException extends ManagementException { - /** - * Initializes a new instance of the DefaultErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public DefaultErrorResponseErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the DefaultErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public DefaultErrorResponseErrorException(String message, HttpResponse response, DefaultErrorResponseError value) { - super(message, response, value); - } - - /** {@inheritDoc} */ - @Override - public DefaultErrorResponseError getValue() { - return (DefaultErrorResponseError) super.getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java deleted file mode 100644 index 70380a029674..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java +++ /dev/null @@ -1,81 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Details of a diagnostics data provider. */ -@Fluent -public final class DiagnosticDataProviderMetadata { - /* - * Name of data provider - */ - @JsonProperty(value = "providerName") - private String providerName; - - /* - * Collection of properties - */ - @JsonProperty(value = "propertyBag") - private List propertyBag; - - /** Creates an instance of DiagnosticDataProviderMetadata class. */ - public DiagnosticDataProviderMetadata() { - } - - /** - * Get the providerName property: Name of data provider. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: Name of data provider. - * - * @param providerName the providerName value to set. - * @return the DiagnosticDataProviderMetadata object itself. - */ - public DiagnosticDataProviderMetadata withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the propertyBag property: Collection of properties. - * - * @return the propertyBag value. - */ - public List propertyBag() { - return this.propertyBag; - } - - /** - * Set the propertyBag property: Collection of properties. - * - * @param propertyBag the propertyBag value to set. - * @return the DiagnosticDataProviderMetadata object itself. - */ - public DiagnosticDataProviderMetadata withPropertyBag( - List propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (propertyBag() != null) { - propertyBag().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java deleted file mode 100644 index bc385080b743..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Property details. */ -@Fluent -public final class DiagnosticDataProviderMetadataPropertyBagItem { - /* - * Property name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Property value - */ - @JsonProperty(value = "value") - private String value; - - /** Creates an instance of DiagnosticDataProviderMetadataPropertyBagItem class. */ - public DiagnosticDataProviderMetadataPropertyBagItem() { - } - - /** - * Get the name property: Property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Property name. - * - * @param name the name value to set. - * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. - */ - public DiagnosticDataProviderMetadataPropertyBagItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Property value. - * - * @param value the value value to set. - * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. - */ - public DiagnosticDataProviderMetadataPropertyBagItem withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java deleted file mode 100644 index 1379ab0e2800..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Diagnostics data column. */ -@Fluent -public final class DiagnosticDataTableResponseColumn { - /* - * Column name - */ - @JsonProperty(value = "columnName") - private String columnName; - - /* - * Data type of the column - */ - @JsonProperty(value = "dataType") - private String dataType; - - /* - * Column type - */ - @JsonProperty(value = "columnType") - private String columnType; - - /** Creates an instance of DiagnosticDataTableResponseColumn class. */ - public DiagnosticDataTableResponseColumn() { - } - - /** - * Get the columnName property: Column name. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: Column name. - * - * @param columnName the columnName value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Get the dataType property: Data type of the column. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Data type of the column. - * - * @param dataType the dataType value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the columnType property: Column type. - * - * @return the columnType value. - */ - public String columnType() { - return this.columnType; - } - - /** - * Set the columnType property: Column type. - * - * @param columnType the columnType value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withColumnType(String columnType) { - this.columnType = columnType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java deleted file mode 100644 index 6d338c3bc35b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java +++ /dev/null @@ -1,106 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Diagnostics data table. */ -@Fluent -public final class DiagnosticDataTableResponseObject { - /* - * Table name - */ - @JsonProperty(value = "tableName") - private String tableName; - - /* - * Columns in the table - */ - @JsonProperty(value = "columns") - private List columns; - - /* - * Rows in the table - */ - @JsonProperty(value = "rows") - private List rows; - - /** Creates an instance of DiagnosticDataTableResponseObject class. */ - public DiagnosticDataTableResponseObject() { - } - - /** - * Get the tableName property: Table name. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Set the tableName property: Table name. - * - * @param tableName the tableName value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the columns property: Columns in the table. - * - * @return the columns value. - */ - public List columns() { - return this.columns; - } - - /** - * Set the columns property: Columns in the table. - * - * @param columns the columns value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withColumns(List columns) { - this.columns = columns; - return this; - } - - /** - * Get the rows property: Rows in the table. - * - * @return the rows value. - */ - public List rows() { - return this.rows; - } - - /** - * Set the rows property: Rows in the table. - * - * @param rows the rows value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withRows(List rows) { - this.rows = rows; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columns() != null) { - columns().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java deleted file mode 100644 index b70b85b60500..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java +++ /dev/null @@ -1,128 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Rendering details of a diagnostics table. */ -@Fluent -public final class DiagnosticRendering { - /* - * Rendering type - */ - @JsonProperty(value = "type") - private Integer type; - - /* - * Title of the table - */ - @JsonProperty(value = "title") - private String title; - - /* - * Description of the table - */ - @JsonProperty(value = "description") - private String description; - - /* - * Flag if the table should be rendered - */ - @JsonProperty(value = "isVisible") - private Boolean isVisible; - - /** Creates an instance of DiagnosticRendering class. */ - public DiagnosticRendering() { - } - - /** - * Get the type property: Rendering type. - * - * @return the type value. - */ - public Integer type() { - return this.type; - } - - /** - * Set the type property: Rendering type. - * - * @param type the type value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withType(Integer type) { - this.type = type; - return this; - } - - /** - * Get the title property: Title of the table. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Title of the table. - * - * @param title the title value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Description of the table. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the table. - * - * @param description the description value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the isVisible property: Flag if the table should be rendered. - * - * @return the isVisible value. - */ - public Boolean isVisible() { - return this.isVisible; - } - - /** - * Set the isVisible property: Flag if the table should be rendered. - * - * @param isVisible the isVisible value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withIsVisible(Boolean isVisible) { - this.isVisible = isVisible; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java deleted file mode 100644 index db92218e5f06..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java +++ /dev/null @@ -1,54 +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.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Support topic information. */ -@Immutable -public final class DiagnosticSupportTopic { - /* - * Unique topic identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * PES identifier - */ - @JsonProperty(value = "pesId", access = JsonProperty.Access.WRITE_ONLY) - private String pesId; - - /** Creates an instance of DiagnosticSupportTopic class. */ - public DiagnosticSupportTopic() { - } - - /** - * Get the id property: Unique topic identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the pesId property: PES identifier. - * - * @return the pesId value. - */ - public String pesId() { - return this.pesId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java deleted file mode 100644 index 097fd4f2d489..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; - -/** An immutable client-side representation of Diagnostics. */ -public interface Diagnostics { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Diagnostics resource specific properties. - * - * @return the properties value. - */ - DiagnosticsProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner object. - * - * @return the inner object. - */ - DiagnosticsInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java deleted file mode 100644 index 855f169b1bca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java +++ /dev/null @@ -1,32 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import java.util.List; - -/** An immutable client-side representation of DiagnosticsCollection. */ -public interface DiagnosticsCollection { - /** - * Gets the value property: Collection of diagnostic data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner object. - * - * @return the inner object. - */ - DiagnosticsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java deleted file mode 100644 index dcfb30eb74e9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java +++ /dev/null @@ -1,82 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Diagnostics data returned from a detector. */ -@Fluent -public final class DiagnosticsDataApiResponse { - /* - * Table response - */ - @JsonProperty(value = "table") - private DiagnosticDataTableResponseObject table; - - /* - * Details of the table response - */ - @JsonProperty(value = "renderingProperties") - private DiagnosticRendering renderingProperties; - - /** Creates an instance of DiagnosticsDataApiResponse class. */ - public DiagnosticsDataApiResponse() { - } - - /** - * Get the table property: Table response. - * - * @return the table value. - */ - public DiagnosticDataTableResponseObject table() { - return this.table; - } - - /** - * Set the table property: Table response. - * - * @param table the table value to set. - * @return the DiagnosticsDataApiResponse object itself. - */ - public DiagnosticsDataApiResponse withTable(DiagnosticDataTableResponseObject table) { - this.table = table; - return this; - } - - /** - * Get the renderingProperties property: Details of the table response. - * - * @return the renderingProperties value. - */ - public DiagnosticRendering renderingProperties() { - return this.renderingProperties; - } - - /** - * Set the renderingProperties property: Details of the table response. - * - * @param renderingProperties the renderingProperties value to set. - * @return the DiagnosticsDataApiResponse object itself. - */ - public DiagnosticsDataApiResponse withRenderingProperties(DiagnosticRendering renderingProperties) { - this.renderingProperties = renderingProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (table() != null) { - table().validate(); - } - if (renderingProperties() != null) { - renderingProperties().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java deleted file mode 100644 index 0be766b4afb6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java +++ /dev/null @@ -1,185 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Metadata of the diagnostics response. */ -@Fluent -public final class DiagnosticsDefinition { - /* - * Unique detector name - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Display Name of the detector - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Details of the diagnostics info - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * Authors' names of the detector - */ - @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) - private String author; - - /* - * Category of the detector - */ - @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) - private String category; - - /* - * List of support topics - */ - @JsonProperty(value = "supportTopicList") - private List supportTopicList; - - /* - * List of analysis types - */ - @JsonProperty(value = "analysisTypes") - private List analysisTypes; - - /* - * Authors' names of the detector - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Authors' names of the detector - */ - @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) - private Float score; - - /** Creates an instance of DiagnosticsDefinition class. */ - public DiagnosticsDefinition() { - } - - /** - * Get the id property: Unique detector name. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Display Name of the detector. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: Details of the diagnostics info. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the author property: Authors' names of the detector. - * - * @return the author value. - */ - public String author() { - return this.author; - } - - /** - * Get the category property: Category of the detector. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Get the supportTopicList property: List of support topics. - * - * @return the supportTopicList value. - */ - public List supportTopicList() { - return this.supportTopicList; - } - - /** - * Set the supportTopicList property: List of support topics. - * - * @param supportTopicList the supportTopicList value to set. - * @return the DiagnosticsDefinition object itself. - */ - public DiagnosticsDefinition withSupportTopicList(List supportTopicList) { - this.supportTopicList = supportTopicList; - return this; - } - - /** - * Get the analysisTypes property: List of analysis types. - * - * @return the analysisTypes value. - */ - public List analysisTypes() { - return this.analysisTypes; - } - - /** - * Set the analysisTypes property: List of analysis types. - * - * @param analysisTypes the analysisTypes value to set. - * @return the DiagnosticsDefinition object itself. - */ - public DiagnosticsDefinition withAnalysisTypes(List analysisTypes) { - this.analysisTypes = analysisTypes; - return this; - } - - /** - * Get the type property: Authors' names of the detector. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the score property: Authors' names of the detector. - * - * @return the score value. - */ - public Float score() { - return this.score; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportTopicList() != null) { - supportTopicList().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java deleted file mode 100644 index f0edd43a932b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java +++ /dev/null @@ -1,141 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Diagnostics resource specific properties. */ -@Fluent -public final class DiagnosticsProperties { - /* - * Metadata of the diagnostics response. - */ - @JsonProperty(value = "metadata") - private DiagnosticsDefinition metadata; - - /* - * Set of data collections associated with the response. - */ - @JsonProperty(value = "dataset") - private List dataset; - - /* - * Status of the diagnostics response. - */ - @JsonProperty(value = "status") - private DiagnosticsStatus status; - - /* - * List of data providers' metadata. - */ - @JsonProperty(value = "dataProviderMetadata") - private DiagnosticDataProviderMetadata dataProviderMetadata; - - /** Creates an instance of DiagnosticsProperties class. */ - public DiagnosticsProperties() { - } - - /** - * Get the metadata property: Metadata of the diagnostics response. - * - * @return the metadata value. - */ - public DiagnosticsDefinition metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata of the diagnostics response. - * - * @param metadata the metadata value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withMetadata(DiagnosticsDefinition metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the dataset property: Set of data collections associated with the response. - * - * @return the dataset value. - */ - public List dataset() { - return this.dataset; - } - - /** - * Set the dataset property: Set of data collections associated with the response. - * - * @param dataset the dataset value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withDataset(List dataset) { - this.dataset = dataset; - return this; - } - - /** - * Get the status property: Status of the diagnostics response. - * - * @return the status value. - */ - public DiagnosticsStatus status() { - return this.status; - } - - /** - * Set the status property: Status of the diagnostics response. - * - * @param status the status value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withStatus(DiagnosticsStatus status) { - this.status = status; - return this; - } - - /** - * Get the dataProviderMetadata property: List of data providers' metadata. - * - * @return the dataProviderMetadata value. - */ - public DiagnosticDataProviderMetadata dataProviderMetadata() { - return this.dataProviderMetadata; - } - - /** - * Set the dataProviderMetadata property: List of data providers' metadata. - * - * @param dataProviderMetadata the dataProviderMetadata value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withDataProviderMetadata(DiagnosticDataProviderMetadata dataProviderMetadata) { - this.dataProviderMetadata = dataProviderMetadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (dataset() != null) { - dataset().forEach(e -> e.validate()); - } - if (status() != null) { - status().validate(); - } - if (dataProviderMetadata() != null) { - dataProviderMetadata().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java deleted file mode 100644 index 899d1bffb395..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Rendering details of a diagnostics table. */ -@Fluent -public final class DiagnosticsStatus { - /* - * Diagnostic message - */ - @JsonProperty(value = "message") - private String message; - - /* - * Status - */ - @JsonProperty(value = "statusId") - private Integer statusId; - - /** Creates an instance of DiagnosticsStatus class. */ - public DiagnosticsStatus() { - } - - /** - * Get the message property: Diagnostic message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Diagnostic message. - * - * @param message the message value to set. - * @return the DiagnosticsStatus object itself. - */ - public DiagnosticsStatus withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the statusId property: Status. - * - * @return the statusId value. - */ - public Integer statusId() { - return this.statusId; - } - - /** - * Set the statusId property: Status. - * - * @param statusId the statusId value to set. - * @return the DiagnosticsStatus object itself. - */ - public DiagnosticsStatus withStatusId(Integer statusId) { - this.statusId = statusId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java deleted file mode 100644 index be7d141905d1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java +++ /dev/null @@ -1,54 +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.appcontainers.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** DNS verification test result. */ -public enum DnsVerificationTestResult { - /** Enum value Passed. */ - PASSED("Passed"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Skipped. */ - SKIPPED("Skipped"); - - /** The actual serialized value for a DnsVerificationTestResult instance. */ - private final String value; - - DnsVerificationTestResult(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DnsVerificationTestResult instance. - * - * @param value the serialized value to parse. - * @return the parsed DnsVerificationTestResult object, or null if unable to parse. - */ - @JsonCreator - public static DnsVerificationTestResult fromString(String value) { - if (value == null) { - return null; - } - DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); - for (DnsVerificationTestResult item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java deleted file mode 100644 index 10f4f38fd2fe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** An immutable client-side representation of EnvironmentAuthToken. */ -public interface EnvironmentAuthToken { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the token property: Auth token value. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner object. - * - * @return the inner object. - */ - EnvironmentAuthTokenInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java deleted file mode 100644 index aa7e68f3d523..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java +++ /dev/null @@ -1,65 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Provisioning state of the Environment. */ -public final class EnvironmentProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Waiting for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState WAITING = fromString("Waiting"); - - /** Static value InitializationInProgress for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INITIALIZATION_IN_PROGRESS = - fromString("InitializationInProgress"); - - /** Static value InfrastructureSetupInProgress for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS = - fromString("InfrastructureSetupInProgress"); - - /** Static value InfrastructureSetupComplete for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE = - fromString("InfrastructureSetupComplete"); - - /** Static value ScheduledForDelete for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); - - /** Static value UpgradeRequested for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState UPGRADE_REQUESTED = fromString("UpgradeRequested"); - - /** Static value UpgradeFailed for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState UPGRADE_FAILED = fromString("UpgradeFailed"); - - /** - * Creates or finds a EnvironmentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentProvisioningState. - */ - @JsonCreator - public static EnvironmentProvisioningState fromString(String name) { - return fromString(name, EnvironmentProvisioningState.class); - } - - /** - * Gets known EnvironmentProvisioningState values. - * - * @return known EnvironmentProvisioningState values. - */ - public static Collection values() { - return values(EnvironmentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java deleted file mode 100644 index 63eaf03305c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java +++ /dev/null @@ -1,58 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed Environment resource SKU properties. */ -@Fluent -public final class EnvironmentSkuProperties { - /* - * Name of the Sku. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** Creates an instance of EnvironmentSkuProperties class. */ - public EnvironmentSkuProperties() { - } - - /** - * Get the name property: Name of the Sku. - * - * @return the name value. - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name property: Name of the Sku. - * - * @param name the name value to set. - * @return the EnvironmentSkuProperties object itself. - */ - public EnvironmentSkuProperties withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model EnvironmentSkuProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentSkuProperties.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java deleted file mode 100644 index 415303a593df..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App container environment variable. */ -@Fluent -public final class EnvironmentVar { - /* - * Environment variable name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Non-secret environment variable value. - */ - @JsonProperty(value = "value") - private String value; - - /* - * Name of the Container App secret from which to pull the environment variable value. - */ - @JsonProperty(value = "secretRef") - private String secretRef; - - /** Creates an instance of EnvironmentVar class. */ - public EnvironmentVar() { - } - - /** - * Get the name property: Environment variable name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Environment variable name. - * - * @param name the name value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Non-secret environment variable value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Non-secret environment variable value. - * - * @param value the value value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * - * @param secretRef the secretRef value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java deleted file mode 100644 index 01baaa9fa9f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The complex type of the extended location. */ -@Fluent -public final class ExtendedLocation { - /* - * The name of the extended location. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The type of the extended location. - */ - @JsonProperty(value = "type") - private ExtendedLocationTypes type; - - /** Creates an instance of ExtendedLocation class. */ - public ExtendedLocation() { - } - - /** - * Get the name property: The name of the extended location. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the extended location. - * - * @param name the name value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The type of the extended location. - * - * @return the type value. - */ - public ExtendedLocationTypes type() { - return this.type; - } - - /** - * Set the type property: The type of the extended location. - * - * @param type the type value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withType(ExtendedLocationTypes type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java deleted file mode 100644 index 2fa5af06d94d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java +++ /dev/null @@ -1,35 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The type of extendedLocation. */ -public final class ExtendedLocationTypes extends ExpandableStringEnum { - /** Static value CustomLocation for ExtendedLocationTypes. */ - public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); - - /** - * Creates or finds a ExtendedLocationTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExtendedLocationTypes. - */ - @JsonCreator - public static ExtendedLocationTypes fromString(String name) { - return fromString(name, ExtendedLocationTypes.class); - } - - /** - * Gets known ExtendedLocationTypes values. - * - * @return known ExtendedLocationTypes values. - */ - public static Collection values() { - return values(ExtendedLocationTypes.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java deleted file mode 100644 index 217ee0f35166..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java +++ /dev/null @@ -1,137 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Facebook provider. */ -@Fluent -public final class Facebook { - /* - * false if the Facebook provider should not be enabled despite the set registration; otherwise, - * true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the app registration for the Facebook provider. - */ - @JsonProperty(value = "registration") - private AppRegistration registration; - - /* - * The version of the Facebook api to be used while logging in. - */ - @JsonProperty(value = "graphApiVersion") - private String graphApiVersion; - - /* - * The configuration settings of the login flow. - */ - @JsonProperty(value = "login") - private LoginScopes login; - - /** Creates an instance of Facebook class. */ - public Facebook() { - } - - /** - * Get the enabled property: <code>false</code> if the Facebook provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Facebook provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Facebook object itself. - */ - public Facebook withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the Facebook provider. - * - * @return the registration value. - */ - public AppRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the Facebook provider. - * - * @param registration the registration value to set. - * @return the Facebook object itself. - */ - public Facebook withRegistration(AppRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the graphApiVersion property: The version of the Facebook api to be used while logging in. - * - * @return the graphApiVersion value. - */ - public String graphApiVersion() { - return this.graphApiVersion; - } - - /** - * Set the graphApiVersion property: The version of the Facebook api to be used while logging in. - * - * @param graphApiVersion the graphApiVersion value to set. - * @return the Facebook object itself. - */ - public Facebook withGraphApiVersion(String graphApiVersion) { - this.graphApiVersion = graphApiVersion; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Facebook object itself. - */ - public Facebook withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java deleted file mode 100644 index f60cb05443c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of a forward proxy used to make the requests. */ -@Fluent -public final class ForwardProxy { - /* - * The convention used to determine the url of the request made. - */ - @JsonProperty(value = "convention") - private ForwardProxyConvention convention; - - /* - * The name of the header containing the host of the request. - */ - @JsonProperty(value = "customHostHeaderName") - private String customHostHeaderName; - - /* - * The name of the header containing the scheme of the request. - */ - @JsonProperty(value = "customProtoHeaderName") - private String customProtoHeaderName; - - /** Creates an instance of ForwardProxy class. */ - public ForwardProxy() { - } - - /** - * Get the convention property: The convention used to determine the url of the request made. - * - * @return the convention value. - */ - public ForwardProxyConvention convention() { - return this.convention; - } - - /** - * Set the convention property: The convention used to determine the url of the request made. - * - * @param convention the convention value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withConvention(ForwardProxyConvention convention) { - this.convention = convention; - return this; - } - - /** - * Get the customHostHeaderName property: The name of the header containing the host of the request. - * - * @return the customHostHeaderName value. - */ - public String customHostHeaderName() { - return this.customHostHeaderName; - } - - /** - * Set the customHostHeaderName property: The name of the header containing the host of the request. - * - * @param customHostHeaderName the customHostHeaderName value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withCustomHostHeaderName(String customHostHeaderName) { - this.customHostHeaderName = customHostHeaderName; - return this; - } - - /** - * Get the customProtoHeaderName property: The name of the header containing the scheme of the request. - * - * @return the customProtoHeaderName value. - */ - public String customProtoHeaderName() { - return this.customProtoHeaderName; - } - - /** - * Set the customProtoHeaderName property: The name of the header containing the scheme of the request. - * - * @param customProtoHeaderName the customProtoHeaderName value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withCustomProtoHeaderName(String customProtoHeaderName) { - this.customProtoHeaderName = customProtoHeaderName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java deleted file mode 100644 index 67a969e08129..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java +++ /dev/null @@ -1,54 +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.appcontainers.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The convention used to determine the url of the request made. */ -public enum ForwardProxyConvention { - /** Enum value NoProxy. */ - NO_PROXY("NoProxy"), - - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Custom. */ - CUSTOM("Custom"); - - /** The actual serialized value for a ForwardProxyConvention instance. */ - private final String value; - - ForwardProxyConvention(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ForwardProxyConvention instance. - * - * @param value the serialized value to parse. - * @return the parsed ForwardProxyConvention object, or null if unable to parse. - */ - @JsonCreator - public static ForwardProxyConvention fromString(String value) { - if (value == null) { - return null; - } - ForwardProxyConvention[] items = ForwardProxyConvention.values(); - for (ForwardProxyConvention item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java deleted file mode 100644 index 3cbf2faf2f43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java +++ /dev/null @@ -1,111 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the GitHub provider. */ -@Fluent -public final class GitHub { - /* - * false if the GitHub provider should not be enabled despite the set registration; otherwise, - * true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the app registration for the GitHub provider. - */ - @JsonProperty(value = "registration") - private ClientRegistration registration; - - /* - * The configuration settings of the login flow. - */ - @JsonProperty(value = "login") - private LoginScopes login; - - /** Creates an instance of GitHub class. */ - public GitHub() { - } - - /** - * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the GitHub object itself. - */ - public GitHub withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the GitHub provider. - * - * @return the registration value. - */ - public ClientRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the GitHub provider. - * - * @param registration the registration value to set. - * @return the GitHub object itself. - */ - public GitHub withRegistration(ClientRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the GitHub object itself. - */ - public GitHub withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java deleted file mode 100644 index 18644f901af7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java +++ /dev/null @@ -1,238 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration properties that define the mutable settings of a Container App SourceControl. */ -@Fluent -public final class GithubActionConfiguration { - /* - * Registry configurations. - */ - @JsonProperty(value = "registryInfo") - private RegistryInfo registryInfo; - - /* - * AzureCredentials configurations. - */ - @JsonProperty(value = "azureCredentials") - private AzureCredentials azureCredentials; - - /* - * Context path - */ - @JsonProperty(value = "contextPath") - private String contextPath; - - /* - * Image name - */ - @JsonProperty(value = "image") - private String image; - - /* - * Code or Image - */ - @JsonProperty(value = "publishType") - private String publishType; - - /* - * Operation system - */ - @JsonProperty(value = "os") - private String os; - - /* - * Runtime stack - */ - @JsonProperty(value = "runtimeStack") - private String runtimeStack; - - /* - * Runtime version - */ - @JsonProperty(value = "runtimeVersion") - private String runtimeVersion; - - /** Creates an instance of GithubActionConfiguration class. */ - public GithubActionConfiguration() { - } - - /** - * Get the registryInfo property: Registry configurations. - * - * @return the registryInfo value. - */ - public RegistryInfo registryInfo() { - return this.registryInfo; - } - - /** - * Set the registryInfo property: Registry configurations. - * - * @param registryInfo the registryInfo value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRegistryInfo(RegistryInfo registryInfo) { - this.registryInfo = registryInfo; - return this; - } - - /** - * Get the azureCredentials property: AzureCredentials configurations. - * - * @return the azureCredentials value. - */ - public AzureCredentials azureCredentials() { - return this.azureCredentials; - } - - /** - * Set the azureCredentials property: AzureCredentials configurations. - * - * @param azureCredentials the azureCredentials value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withAzureCredentials(AzureCredentials azureCredentials) { - this.azureCredentials = azureCredentials; - return this; - } - - /** - * Get the contextPath property: Context path. - * - * @return the contextPath value. - */ - public String contextPath() { - return this.contextPath; - } - - /** - * Set the contextPath property: Context path. - * - * @param contextPath the contextPath value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withContextPath(String contextPath) { - this.contextPath = contextPath; - return this; - } - - /** - * Get the image property: Image name. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Image name. - * - * @param image the image value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the publishType property: Code or Image. - * - * @return the publishType value. - */ - public String publishType() { - return this.publishType; - } - - /** - * Set the publishType property: Code or Image. - * - * @param publishType the publishType value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withPublishType(String publishType) { - this.publishType = publishType; - return this; - } - - /** - * Get the os property: Operation system. - * - * @return the os value. - */ - public String os() { - return this.os; - } - - /** - * Set the os property: Operation system. - * - * @param os the os value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withOs(String os) { - this.os = os; - return this; - } - - /** - * Get the runtimeStack property: Runtime stack. - * - * @return the runtimeStack value. - */ - public String runtimeStack() { - return this.runtimeStack; - } - - /** - * Set the runtimeStack property: Runtime stack. - * - * @param runtimeStack the runtimeStack value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRuntimeStack(String runtimeStack) { - this.runtimeStack = runtimeStack; - return this; - } - - /** - * Get the runtimeVersion property: Runtime version. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: Runtime version. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registryInfo() != null) { - registryInfo().validate(); - } - if (azureCredentials() != null) { - azureCredentials().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java deleted file mode 100644 index 9cc8c4a8f625..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java +++ /dev/null @@ -1,116 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * The configuration settings that determines the validation flow of users using ContainerApp Service - * Authentication/Authorization. - */ -@Fluent -public final class GlobalValidation { - /* - * The action to take when an unauthenticated client attempts to access the app. - */ - @JsonProperty(value = "unauthenticatedClientAction") - private UnauthenticatedClientActionV2 unauthenticatedClientAction; - - /* - * The default authentication provider to use when multiple providers are configured. - * This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - */ - @JsonProperty(value = "redirectToProvider") - private String redirectToProvider; - - /* - * The paths for which unauthenticated flow would not be redirected to the login page. - */ - @JsonProperty(value = "excludedPaths") - private List excludedPaths; - - /** Creates an instance of GlobalValidation class. */ - public GlobalValidation() { - } - - /** - * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to - * access the app. - * - * @return the unauthenticatedClientAction value. - */ - public UnauthenticatedClientActionV2 unauthenticatedClientAction() { - return this.unauthenticatedClientAction; - } - - /** - * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to - * access the app. - * - * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withUnauthenticatedClientAction(UnauthenticatedClientActionV2 unauthenticatedClientAction) { - this.unauthenticatedClientAction = unauthenticatedClientAction; - return this; - } - - /** - * Get the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - * - * @return the redirectToProvider value. - */ - public String redirectToProvider() { - return this.redirectToProvider; - } - - /** - * Set the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - * - * @param redirectToProvider the redirectToProvider value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withRedirectToProvider(String redirectToProvider) { - this.redirectToProvider = redirectToProvider; - return this; - } - - /** - * Get the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login - * page. - * - * @return the excludedPaths value. - */ - public List excludedPaths() { - return this.excludedPaths; - } - - /** - * Set the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login - * page. - * - * @param excludedPaths the excludedPaths value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withExcludedPaths(List excludedPaths) { - this.excludedPaths = excludedPaths; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java deleted file mode 100644 index 2d3054e4162d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java +++ /dev/null @@ -1,140 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Google provider. */ -@Fluent -public final class Google { - /* - * false if the Google provider should not be enabled despite the set registration; otherwise, - * true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the app registration for the Google provider. - */ - @JsonProperty(value = "registration") - private ClientRegistration registration; - - /* - * The configuration settings of the login flow. - */ - @JsonProperty(value = "login") - private LoginScopes login; - - /* - * The configuration settings of the Azure Active Directory token validation flow. - */ - @JsonProperty(value = "validation") - private AllowedAudiencesValidation validation; - - /** Creates an instance of Google class. */ - public Google() { - } - - /** - * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Google object itself. - */ - public Google withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the Google provider. - * - * @return the registration value. - */ - public ClientRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the Google provider. - * - * @param registration the registration value to set. - * @return the Google object itself. - */ - public Google withRegistration(ClientRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Google object itself. - */ - public Google withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @return the validation value. - */ - public AllowedAudiencesValidation validation() { - return this.validation; - } - - /** - * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @param validation the validation value to set. - * @return the Google object itself. - */ - public Google withValidation(AllowedAudiencesValidation validation) { - this.validation = validation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - if (validation() != null) { - validation().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java deleted file mode 100644 index 1e42b8eb3e4f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ /dev/null @@ -1,83 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Container App container Http scaling rule. */ -@Fluent -public final class HttpScaleRule { - /* - * Metadata properties to describe http scale rule. - */ - @JsonProperty(value = "metadata") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map metadata; - - /* - * Authentication secrets for the custom scale rule. - */ - @JsonProperty(value = "auth") - private List auth; - - /** Creates an instance of HttpScaleRule class. */ - public HttpScaleRule() { - } - - /** - * Get the metadata property: Metadata properties to describe http scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe http scale rule. - * - * @param metadata the metadata value to set. - * @return the HttpScaleRule object itself. - */ - public HttpScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the custom scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the custom scale rule. - * - * @param auth the auth value to set. - * @return the HttpScaleRule object itself. - */ - public HttpScaleRule withAuth(List auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java deleted file mode 100644 index a6b61f3c5d21..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java +++ /dev/null @@ -1,114 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The configuration settings of the HTTP requests for authentication and authorization requests made against - * ContainerApp Service Authentication/Authorization. - */ -@Fluent -public final class HttpSettings { - /* - * false if the authentication/authorization responses not having the HTTPS scheme are permissible; - * otherwise, true. - */ - @JsonProperty(value = "requireHttps") - private Boolean requireHttps; - - /* - * The configuration settings of the paths HTTP requests. - */ - @JsonProperty(value = "routes") - private HttpSettingsRoutes routes; - - /* - * The configuration settings of a forward proxy used to make the requests. - */ - @JsonProperty(value = "forwardProxy") - private ForwardProxy forwardProxy; - - /** Creates an instance of HttpSettings class. */ - public HttpSettings() { - } - - /** - * Get the requireHttps property: <code>false</code> if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * - * @return the requireHttps value. - */ - public Boolean requireHttps() { - return this.requireHttps; - } - - /** - * Set the requireHttps property: <code>false</code> if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * - * @param requireHttps the requireHttps value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withRequireHttps(Boolean requireHttps) { - this.requireHttps = requireHttps; - return this; - } - - /** - * Get the routes property: The configuration settings of the paths HTTP requests. - * - * @return the routes value. - */ - public HttpSettingsRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: The configuration settings of the paths HTTP requests. - * - * @param routes the routes value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withRoutes(HttpSettingsRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * - * @return the forwardProxy value. - */ - public ForwardProxy forwardProxy() { - return this.forwardProxy; - } - - /** - * Set the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * - * @param forwardProxy the forwardProxy value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withForwardProxy(ForwardProxy forwardProxy) { - this.forwardProxy = forwardProxy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (forwardProxy() != null) { - forwardProxy().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java deleted file mode 100644 index 44e17ed42b3d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the paths HTTP requests. */ -@Fluent -public final class HttpSettingsRoutes { - /* - * The prefix that should precede all the authentication/authorization paths. - */ - @JsonProperty(value = "apiPrefix") - private String apiPrefix; - - /** Creates an instance of HttpSettingsRoutes class. */ - public HttpSettingsRoutes() { - } - - /** - * Get the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * - * @return the apiPrefix value. - */ - public String apiPrefix() { - return this.apiPrefix; - } - - /** - * Set the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * - * @param apiPrefix the apiPrefix value to set. - * @return the HttpSettingsRoutes object itself. - */ - public HttpSettingsRoutes withApiPrefix(String apiPrefix) { - this.apiPrefix = apiPrefix; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java deleted file mode 100644 index 923d51db32d8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java +++ /dev/null @@ -1,273 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** - * The configuration settings of each of the identity providers used to configure ContainerApp Service - * Authentication/Authorization. - */ -@Fluent -public final class IdentityProviders { - /* - * The configuration settings of the Azure Active directory provider. - */ - @JsonProperty(value = "azureActiveDirectory") - private AzureActiveDirectory azureActiveDirectory; - - /* - * The configuration settings of the Facebook provider. - */ - @JsonProperty(value = "facebook") - private Facebook facebook; - - /* - * The configuration settings of the GitHub provider. - */ - @JsonProperty(value = "gitHub") - private GitHub gitHub; - - /* - * The configuration settings of the Google provider. - */ - @JsonProperty(value = "google") - private Google google; - - /* - * The configuration settings of the Twitter provider. - */ - @JsonProperty(value = "twitter") - private Twitter twitter; - - /* - * The configuration settings of the Apple provider. - */ - @JsonProperty(value = "apple") - private Apple apple; - - /* - * The configuration settings of the Azure Static Web Apps provider. - */ - @JsonProperty(value = "azureStaticWebApps") - private AzureStaticWebApps azureStaticWebApps; - - /* - * The map of the name of the alias of each custom Open ID Connect provider to the - * configuration settings of the custom Open ID Connect provider. - */ - @JsonProperty(value = "customOpenIdConnectProviders") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customOpenIdConnectProviders; - - /** Creates an instance of IdentityProviders class. */ - public IdentityProviders() { - } - - /** - * Get the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * - * @return the azureActiveDirectory value. - */ - public AzureActiveDirectory azureActiveDirectory() { - return this.azureActiveDirectory; - } - - /** - * Set the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * - * @param azureActiveDirectory the azureActiveDirectory value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory) { - this.azureActiveDirectory = azureActiveDirectory; - return this; - } - - /** - * Get the facebook property: The configuration settings of the Facebook provider. - * - * @return the facebook value. - */ - public Facebook facebook() { - return this.facebook; - } - - /** - * Set the facebook property: The configuration settings of the Facebook provider. - * - * @param facebook the facebook value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withFacebook(Facebook facebook) { - this.facebook = facebook; - return this; - } - - /** - * Get the gitHub property: The configuration settings of the GitHub provider. - * - * @return the gitHub value. - */ - public GitHub gitHub() { - return this.gitHub; - } - - /** - * Set the gitHub property: The configuration settings of the GitHub provider. - * - * @param gitHub the gitHub value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withGitHub(GitHub gitHub) { - this.gitHub = gitHub; - return this; - } - - /** - * Get the google property: The configuration settings of the Google provider. - * - * @return the google value. - */ - public Google google() { - return this.google; - } - - /** - * Set the google property: The configuration settings of the Google provider. - * - * @param google the google value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withGoogle(Google google) { - this.google = google; - return this; - } - - /** - * Get the twitter property: The configuration settings of the Twitter provider. - * - * @return the twitter value. - */ - public Twitter twitter() { - return this.twitter; - } - - /** - * Set the twitter property: The configuration settings of the Twitter provider. - * - * @param twitter the twitter value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withTwitter(Twitter twitter) { - this.twitter = twitter; - return this; - } - - /** - * Get the apple property: The configuration settings of the Apple provider. - * - * @return the apple value. - */ - public Apple apple() { - return this.apple; - } - - /** - * Set the apple property: The configuration settings of the Apple provider. - * - * @param apple the apple value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withApple(Apple apple) { - this.apple = apple; - return this; - } - - /** - * Get the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * - * @return the azureStaticWebApps value. - */ - public AzureStaticWebApps azureStaticWebApps() { - return this.azureStaticWebApps; - } - - /** - * Set the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * - * @param azureStaticWebApps the azureStaticWebApps value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withAzureStaticWebApps(AzureStaticWebApps azureStaticWebApps) { - this.azureStaticWebApps = azureStaticWebApps; - return this; - } - - /** - * Get the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the configuration settings of the custom Open ID Connect provider. - * - * @return the customOpenIdConnectProviders value. - */ - public Map customOpenIdConnectProviders() { - return this.customOpenIdConnectProviders; - } - - /** - * Set the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the configuration settings of the custom Open ID Connect provider. - * - * @param customOpenIdConnectProviders the customOpenIdConnectProviders value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withCustomOpenIdConnectProviders( - Map customOpenIdConnectProviders) { - this.customOpenIdConnectProviders = customOpenIdConnectProviders; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureActiveDirectory() != null) { - azureActiveDirectory().validate(); - } - if (facebook() != null) { - facebook().validate(); - } - if (gitHub() != null) { - gitHub().validate(); - } - if (google() != null) { - google().validate(); - } - if (twitter() != null) { - twitter().validate(); - } - if (apple() != null) { - apple().validate(); - } - if (azureStaticWebApps() != null) { - azureStaticWebApps().validate(); - } - if (customOpenIdConnectProviders() != null) { - customOpenIdConnectProviders() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java deleted file mode 100644 index 7d3bce205292..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ /dev/null @@ -1,260 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App Ingress configuration. */ -@Fluent -public final class Ingress { - /* - * Hostname. - */ - @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) - private String fqdn; - - /* - * Bool indicating if app exposes an external http endpoint - */ - @JsonProperty(value = "external") - private Boolean external; - - /* - * Target Port in containers for traffic from ingress - */ - @JsonProperty(value = "targetPort") - private Integer targetPort; - - /* - * Exposed Port in containers for TCP traffic from ingress - */ - @JsonProperty(value = "exposedPort") - private Integer exposedPort; - - /* - * Ingress transport protocol - */ - @JsonProperty(value = "transport") - private IngressTransportMethod transport; - - /* - * Traffic weights for app's revisions - */ - @JsonProperty(value = "traffic") - private List traffic; - - /* - * custom domain bindings for Container Apps' hostnames. - */ - @JsonProperty(value = "customDomains") - private List customDomains; - - /* - * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected - * to HTTPS connections - */ - @JsonProperty(value = "allowInsecure") - private Boolean allowInsecure; - - /* - * Rules to restrict incoming IP address. - */ - @JsonProperty(value = "ipSecurityRestrictions") - private List ipSecurityRestrictions; - - /** Creates an instance of Ingress class. */ - public Ingress() { - } - - /** - * Get the fqdn property: Hostname. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the external property: Bool indicating if app exposes an external http endpoint. - * - * @return the external value. - */ - public Boolean external() { - return this.external; - } - - /** - * Set the external property: Bool indicating if app exposes an external http endpoint. - * - * @param external the external value to set. - * @return the Ingress object itself. - */ - public Ingress withExternal(Boolean external) { - this.external = external; - return this; - } - - /** - * Get the targetPort property: Target Port in containers for traffic from ingress. - * - * @return the targetPort value. - */ - public Integer targetPort() { - return this.targetPort; - } - - /** - * Set the targetPort property: Target Port in containers for traffic from ingress. - * - * @param targetPort the targetPort value to set. - * @return the Ingress object itself. - */ - public Ingress withTargetPort(Integer targetPort) { - this.targetPort = targetPort; - return this; - } - - /** - * Get the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * - * @return the exposedPort value. - */ - public Integer exposedPort() { - return this.exposedPort; - } - - /** - * Set the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * - * @param exposedPort the exposedPort value to set. - * @return the Ingress object itself. - */ - public Ingress withExposedPort(Integer exposedPort) { - this.exposedPort = exposedPort; - return this; - } - - /** - * Get the transport property: Ingress transport protocol. - * - * @return the transport value. - */ - public IngressTransportMethod transport() { - return this.transport; - } - - /** - * Set the transport property: Ingress transport protocol. - * - * @param transport the transport value to set. - * @return the Ingress object itself. - */ - public Ingress withTransport(IngressTransportMethod transport) { - this.transport = transport; - return this; - } - - /** - * Get the traffic property: Traffic weights for app's revisions. - * - * @return the traffic value. - */ - public List traffic() { - return this.traffic; - } - - /** - * Set the traffic property: Traffic weights for app's revisions. - * - * @param traffic the traffic value to set. - * @return the Ingress object itself. - */ - public Ingress withTraffic(List traffic) { - this.traffic = traffic; - return this; - } - - /** - * Get the customDomains property: custom domain bindings for Container Apps' hostnames. - * - * @return the customDomains value. - */ - public List customDomains() { - return this.customDomains; - } - - /** - * Set the customDomains property: custom domain bindings for Container Apps' hostnames. - * - * @param customDomains the customDomains value to set. - * @return the Ingress object itself. - */ - public Ingress withCustomDomains(List customDomains) { - this.customDomains = customDomains; - return this; - } - - /** - * Get the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections. - * - * @return the allowInsecure value. - */ - public Boolean allowInsecure() { - return this.allowInsecure; - } - - /** - * Set the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections. - * - * @param allowInsecure the allowInsecure value to set. - * @return the Ingress object itself. - */ - public Ingress withAllowInsecure(Boolean allowInsecure) { - this.allowInsecure = allowInsecure; - return this; - } - - /** - * Get the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * - * @return the ipSecurityRestrictions value. - */ - public List ipSecurityRestrictions() { - return this.ipSecurityRestrictions; - } - - /** - * Set the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * - * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. - * @return the Ingress object itself. - */ - public Ingress withIpSecurityRestrictions(List ipSecurityRestrictions) { - this.ipSecurityRestrictions = ipSecurityRestrictions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (traffic() != null) { - traffic().forEach(e -> e.validate()); - } - if (customDomains() != null) { - customDomains().forEach(e -> e.validate()); - } - if (ipSecurityRestrictions() != null) { - ipSecurityRestrictions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java deleted file mode 100644 index 23fbbd3f6f4d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java +++ /dev/null @@ -1,44 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Ingress transport protocol. */ -public final class IngressTransportMethod extends ExpandableStringEnum { - /** Static value auto for IngressTransportMethod. */ - public static final IngressTransportMethod AUTO = fromString("auto"); - - /** Static value http for IngressTransportMethod. */ - public static final IngressTransportMethod HTTP = fromString("http"); - - /** Static value http2 for IngressTransportMethod. */ - public static final IngressTransportMethod HTTP2 = fromString("http2"); - - /** Static value tcp for IngressTransportMethod. */ - public static final IngressTransportMethod TCP = fromString("tcp"); - - /** - * Creates or finds a IngressTransportMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngressTransportMethod. - */ - @JsonCreator - public static IngressTransportMethod fromString(String name) { - return fromString(name, IngressTransportMethod.class); - } - - /** - * Gets known IngressTransportMethod values. - * - * @return known IngressTransportMethod values. - */ - public static Collection values() { - return values(IngressTransportMethod.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java deleted file mode 100644 index f1bee6364d89..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ /dev/null @@ -1,75 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import java.util.List; - -/** Container App init container definition. */ -@Fluent -public final class InitContainer extends BaseContainer { - /** Creates an instance of InitContainer class. */ - public InitContainer() { - } - - /** {@inheritDoc} */ - @Override - public InitContainer withImage(String image) { - super.withImage(image); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withCommand(List command) { - super.withCommand(command); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withArgs(List args) { - super.withArgs(args); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withEnv(List env) { - super.withEnv(env); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withResources(ContainerResources resources) { - super.withResources(resources); - return this; - } - - /** {@inheritDoc} */ - @Override - public InitContainer withVolumeMounts(List volumeMounts) { - super.withVolumeMounts(volumeMounts); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java deleted file mode 100644 index 4c27320473b0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java +++ /dev/null @@ -1,152 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Rule to restrict incoming IP address. */ -@Fluent -public final class IpSecurityRestrictionRule { - /* - * Name for the IP restriction rule. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Describe the IP restriction rule that is being sent to the container-app. This is an optional field. - */ - @JsonProperty(value = "description") - private String description; - - /* - * CIDR notation to match incoming IP address - */ - @JsonProperty(value = "ipAddressRange", required = true) - private String ipAddressRange; - - /* - * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny - */ - @JsonProperty(value = "action", required = true) - private Action action; - - /** Creates an instance of IpSecurityRestrictionRule class. */ - public IpSecurityRestrictionRule() { - } - - /** - * Get the name property: Name for the IP restriction rule. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name for the IP restriction rule. - * - * @param name the name value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Describe the IP restriction rule that is being sent to the container-app. This is - * an optional field. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Describe the IP restriction rule that is being sent to the container-app. This is - * an optional field. - * - * @param description the description value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the ipAddressRange property: CIDR notation to match incoming IP address. - * - * @return the ipAddressRange value. - */ - public String ipAddressRange() { - return this.ipAddressRange; - } - - /** - * Set the ipAddressRange property: CIDR notation to match incoming IP address. - * - * @param ipAddressRange the ipAddressRange value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withIpAddressRange(String ipAddressRange) { - this.ipAddressRange = ipAddressRange; - return this; - } - - /** - * Get the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL - * Allow or ALL Deny. - * - * @return the action value. - */ - public Action action() { - return this.action; - } - - /** - * Set the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL - * Allow or ALL Deny. - * - * @param action the action value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withAction(Action action) { - this.action = action; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); - } - if (ipAddressRange() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); - } - if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property action in model IpSecurityRestrictionRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpSecurityRestrictionRule.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java deleted file mode 100644 index 987739c9a185..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the checks that should be made while validating the JWT Claims. */ -@Fluent -public final class JwtClaimChecks { - /* - * The list of the allowed groups. - */ - @JsonProperty(value = "allowedGroups") - private List allowedGroups; - - /* - * The list of the allowed client applications. - */ - @JsonProperty(value = "allowedClientApplications") - private List allowedClientApplications; - - /** Creates an instance of JwtClaimChecks class. */ - public JwtClaimChecks() { - } - - /** - * Get the allowedGroups property: The list of the allowed groups. - * - * @return the allowedGroups value. - */ - public List allowedGroups() { - return this.allowedGroups; - } - - /** - * Set the allowedGroups property: The list of the allowed groups. - * - * @param allowedGroups the allowedGroups value to set. - * @return the JwtClaimChecks object itself. - */ - public JwtClaimChecks withAllowedGroups(List allowedGroups) { - this.allowedGroups = allowedGroups; - return this; - } - - /** - * Get the allowedClientApplications property: The list of the allowed client applications. - * - * @return the allowedClientApplications value. - */ - public List allowedClientApplications() { - return this.allowedClientApplications; - } - - /** - * Set the allowedClientApplications property: The list of the allowed client applications. - * - * @param allowedClientApplications the allowedClientApplications value to set. - * @return the JwtClaimChecks object itself. - */ - public JwtClaimChecks withAllowedClientApplications(List allowedClientApplications) { - this.allowedClientApplications = allowedClientApplications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java deleted file mode 100644 index bfc2e4c6bc58..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Log analytics configuration. */ -@Fluent -public final class LogAnalyticsConfiguration { - /* - * Log analytics customer id - */ - @JsonProperty(value = "customerId") - private String customerId; - - /* - * Log analytics customer key - */ - @JsonProperty(value = "sharedKey") - private String sharedKey; - - /** Creates an instance of LogAnalyticsConfiguration class. */ - public LogAnalyticsConfiguration() { - } - - /** - * Get the customerId property: Log analytics customer id. - * - * @return the customerId value. - */ - public String customerId() { - return this.customerId; - } - - /** - * Set the customerId property: Log analytics customer id. - * - * @param customerId the customerId value to set. - * @return the LogAnalyticsConfiguration object itself. - */ - public LogAnalyticsConfiguration withCustomerId(String customerId) { - this.customerId = customerId; - return this; - } - - /** - * Get the sharedKey property: Log analytics customer key. - * - * @return the sharedKey value. - */ - public String sharedKey() { - return this.sharedKey; - } - - /** - * Set the sharedKey property: Log analytics customer key. - * - * @param sharedKey the sharedKey value to set. - * @return the LogAnalyticsConfiguration object itself. - */ - public LogAnalyticsConfiguration withSharedKey(String sharedKey) { - this.sharedKey = sharedKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java deleted file mode 100644 index cd0a46df20da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java +++ /dev/null @@ -1,44 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. */ -public final class LogLevel extends ExpandableStringEnum { - /** Static value info for LogLevel. */ - public static final LogLevel INFO = fromString("info"); - - /** Static value debug for LogLevel. */ - public static final LogLevel DEBUG = fromString("debug"); - - /** Static value warn for LogLevel. */ - public static final LogLevel WARN = fromString("warn"); - - /** Static value error for LogLevel. */ - public static final LogLevel ERROR = fromString("error"); - - /** - * Creates or finds a LogLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogLevel. - */ - @JsonCreator - public static LogLevel fromString(String name) { - return fromString(name, LogLevel.class); - } - - /** - * Gets known LogLevel values. - * - * @return known LogLevel values. - */ - public static Collection values() { - return values(LogLevel.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java deleted file mode 100644 index 2457b6865eb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java +++ /dev/null @@ -1,176 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ -@Fluent -public final class Login { - /* - * The routes that specify the endpoints used for login and logout requests. - */ - @JsonProperty(value = "routes") - private LoginRoutes routes; - - /* - * true if the fragments from the request are preserved after the login request is made; otherwise, - * false. - */ - @JsonProperty(value = "preserveUrlFragmentsForLogins") - private Boolean preserveUrlFragmentsForLogins; - - /* - * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query - * string part of the URL is ignored. - * This is an advanced setting typically only needed by Windows Store application backends. - * Note that URLs within the current domain are always implicitly allowed. - */ - @JsonProperty(value = "allowedExternalRedirectUrls") - private List allowedExternalRedirectUrls; - - /* - * The configuration settings of the session cookie's expiration. - */ - @JsonProperty(value = "cookieExpiration") - private CookieExpiration cookieExpiration; - - /* - * The configuration settings of the nonce used in the login flow. - */ - @JsonProperty(value = "nonce") - private Nonce nonce; - - /** Creates an instance of Login class. */ - public Login() { - } - - /** - * Get the routes property: The routes that specify the endpoints used for login and logout requests. - * - * @return the routes value. - */ - public LoginRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: The routes that specify the endpoints used for login and logout requests. - * - * @param routes the routes value to set. - * @return the Login object itself. - */ - public Login withRoutes(LoginRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request - * are preserved after the login request is made; otherwise, <code>false</code>. - * - * @return the preserveUrlFragmentsForLogins value. - */ - public Boolean preserveUrlFragmentsForLogins() { - return this.preserveUrlFragmentsForLogins; - } - - /** - * Set the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request - * are preserved after the login request is made; otherwise, <code>false</code>. - * - * @param preserveUrlFragmentsForLogins the preserveUrlFragmentsForLogins value to set. - * @return the Login object itself. - */ - public Login withPreserveUrlFragmentsForLogins(Boolean preserveUrlFragmentsForLogins) { - this.preserveUrlFragmentsForLogins = preserveUrlFragmentsForLogins; - return this; - } - - /** - * Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or - * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting - * typically only needed by Windows Store application backends. Note that URLs within the current domain are always - * implicitly allowed. - * - * @return the allowedExternalRedirectUrls value. - */ - public List allowedExternalRedirectUrls() { - return this.allowedExternalRedirectUrls; - } - - /** - * Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or - * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting - * typically only needed by Windows Store application backends. Note that URLs within the current domain are always - * implicitly allowed. - * - * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. - * @return the Login object itself. - */ - public Login withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { - this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; - return this; - } - - /** - * Get the cookieExpiration property: The configuration settings of the session cookie's expiration. - * - * @return the cookieExpiration value. - */ - public CookieExpiration cookieExpiration() { - return this.cookieExpiration; - } - - /** - * Set the cookieExpiration property: The configuration settings of the session cookie's expiration. - * - * @param cookieExpiration the cookieExpiration value to set. - * @return the Login object itself. - */ - public Login withCookieExpiration(CookieExpiration cookieExpiration) { - this.cookieExpiration = cookieExpiration; - return this; - } - - /** - * Get the nonce property: The configuration settings of the nonce used in the login flow. - * - * @return the nonce value. - */ - public Nonce nonce() { - return this.nonce; - } - - /** - * Set the nonce property: The configuration settings of the nonce used in the login flow. - * - * @param nonce the nonce value to set. - * @return the Login object itself. - */ - public Login withNonce(Nonce nonce) { - this.nonce = nonce; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (cookieExpiration() != null) { - cookieExpiration().validate(); - } - if (nonce() != null) { - nonce().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java deleted file mode 100644 index b46f5243d970..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The routes that specify the endpoints used for login and logout requests. */ -@Fluent -public final class LoginRoutes { - /* - * The endpoint at which a logout request should be made. - */ - @JsonProperty(value = "logoutEndpoint") - private String logoutEndpoint; - - /** Creates an instance of LoginRoutes class. */ - public LoginRoutes() { - } - - /** - * Get the logoutEndpoint property: The endpoint at which a logout request should be made. - * - * @return the logoutEndpoint value. - */ - public String logoutEndpoint() { - return this.logoutEndpoint; - } - - /** - * Set the logoutEndpoint property: The endpoint at which a logout request should be made. - * - * @param logoutEndpoint the logoutEndpoint value to set. - * @return the LoginRoutes object itself. - */ - public LoginRoutes withLogoutEndpoint(String logoutEndpoint) { - this.logoutEndpoint = logoutEndpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java deleted file mode 100644 index 017270ea4dd1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java +++ /dev/null @@ -1,51 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the login flow, including the scopes that should be requested. */ -@Fluent -public final class LoginScopes { - /* - * A list of the scopes that should be requested while authenticating. - */ - @JsonProperty(value = "scopes") - private List scopes; - - /** Creates an instance of LoginScopes class. */ - public LoginScopes() { - } - - /** - * Get the scopes property: A list of the scopes that should be requested while authenticating. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: A list of the scopes that should be requested while authenticating. - * - * @param scopes the scopes value to set. - * @return the LoginScopes object itself. - */ - public LoginScopes withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java deleted file mode 100644 index 3fb9b640518a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java +++ /dev/null @@ -1,508 +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.appcontainers.models; - -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.appcontainers.fluent.models.ManagedEnvironmentInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of ManagedEnvironment. */ -public interface ManagedEnvironment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the sku property: SKU properties of the Environment. - * - * @return the sku value. - */ - EnvironmentSkuProperties sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - EnvironmentProvisioningState provisioningState(); - - /** - * Gets the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - String daprAIInstrumentationKey(); - - /** - * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - String daprAIConnectionString(); - - /** - * Gets the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - VnetConfiguration vnetConfiguration(); - - /** - * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - String deploymentErrors(); - - /** - * Gets the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - String defaultDomain(); - - /** - * Gets the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - String staticIp(); - - /** - * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to - * a destination. Currently only "log-analytics" is supported. - * - * @return the appLogsConfiguration value. - */ - AppLogsConfiguration appLogsConfiguration(); - - /** - * Gets the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - Boolean zoneRedundant(); - - /** - * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - CustomDomainConfiguration customDomainConfiguration(); - - /** - * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - String eventStreamEndpoint(); - - /** - * Gets the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - List workloadProfiles(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner object. - * - * @return the inner object. - */ - ManagedEnvironmentInner innerModel(); - - /** The entirety of the ManagedEnvironment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The ManagedEnvironment definition stages. */ - interface DefinitionStages { - /** The first stage of the ManagedEnvironment definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ManagedEnvironment definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the ManagedEnvironment definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the ManagedEnvironment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithSku, - DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, - DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, - DefinitionStages.WithZoneRedundant, - DefinitionStages.WithCustomDomainConfiguration, - DefinitionStages.WithWorkloadProfiles { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedEnvironment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedEnvironment create(Context context); - } - /** The stage of the ManagedEnvironment definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the ManagedEnvironment definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: SKU properties of the Environment.. - * - * @param sku SKU properties of the Environment. - * @return the next definition stage. - */ - WithCreate withSku(EnvironmentSkuProperties sku); - } - /** The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. */ - interface WithDaprAIInstrumentationKey { - /** - * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export - * Service to Service communication telemetry. - * - * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIInstrumentationKey(String daprAIInstrumentationKey); - } - /** The stage of the ManagedEnvironment definition allowing to specify daprAIConnectionString. */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIConnectionString(String daprAIConnectionString); - } - /** The stage of the ManagedEnvironment definition allowing to specify vnetConfiguration. */ - interface WithVnetConfiguration { - /** - * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration Vnet configuration for the environment. - * @return the next definition stage. - */ - WithCreate withVnetConfiguration(VnetConfiguration vnetConfiguration); - } - /** The stage of the ManagedEnvironment definition allowing to specify appLogsConfiguration. */ - interface WithAppLogsConfiguration { - /** - * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * @return the next definition stage. - */ - WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); - } - /** The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. */ - interface WithZoneRedundant { - /** - * Specifies the zoneRedundant property: Whether or not this Managed Environment is zone-redundant.. - * - * @param zoneRedundant Whether or not this Managed Environment is zone-redundant. - * @return the next definition stage. - */ - WithCreate withZoneRedundant(Boolean zoneRedundant); - } - /** The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - /** The stage of the ManagedEnvironment definition allowing to specify workloadProfiles. */ - interface WithWorkloadProfiles { - /** - * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * - * @param workloadProfiles Workload profiles configured for the Managed Environment. - * @return the next definition stage. - */ - WithCreate withWorkloadProfiles(List workloadProfiles); - } - } - /** - * Begins update for the ManagedEnvironment resource. - * - * @return the stage of resource update. - */ - ManagedEnvironment.Update update(); - - /** The template for ManagedEnvironment update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithSku, - UpdateStages.WithDaprAIInstrumentationKey, - UpdateStages.WithDaprAIConnectionString, - UpdateStages.WithVnetConfiguration, - UpdateStages.WithAppLogsConfiguration, - UpdateStages.WithCustomDomainConfiguration, - UpdateStages.WithWorkloadProfiles { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedEnvironment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedEnvironment apply(Context context); - } - /** The ManagedEnvironment update stages. */ - interface UpdateStages { - /** The stage of the ManagedEnvironment update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the ManagedEnvironment update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: SKU properties of the Environment.. - * - * @param sku SKU properties of the Environment. - * @return the next definition stage. - */ - Update withSku(EnvironmentSkuProperties sku); - } - /** The stage of the ManagedEnvironment update allowing to specify daprAIInstrumentationKey. */ - interface WithDaprAIInstrumentationKey { - /** - * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export - * Service to Service communication telemetry. - * - * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIInstrumentationKey(String daprAIInstrumentationKey); - } - /** The stage of the ManagedEnvironment update allowing to specify daprAIConnectionString. */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIConnectionString(String daprAIConnectionString); - } - /** The stage of the ManagedEnvironment update allowing to specify vnetConfiguration. */ - interface WithVnetConfiguration { - /** - * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration Vnet configuration for the environment. - * @return the next definition stage. - */ - Update withVnetConfiguration(VnetConfiguration vnetConfiguration); - } - /** The stage of the ManagedEnvironment update allowing to specify appLogsConfiguration. */ - interface WithAppLogsConfiguration { - /** - * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * @return the next definition stage. - */ - Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); - } - /** The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - /** The stage of the ManagedEnvironment update allowing to specify workloadProfiles. */ - interface WithWorkloadProfiles { - /** - * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * - * @param workloadProfiles Workload profiles configured for the Managed Environment. - * @return the next definition stage. - */ - Update withWorkloadProfiles(List workloadProfiles); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedEnvironment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedEnvironment refresh(Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response}. - */ - Response getAuthTokenWithResponse(Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token. - */ - EnvironmentAuthToken getAuthToken(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java deleted file mode 100644 index b3e3c06ab879..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ManagedEnvironmentDiagnostics. */ -public interface ManagedEnvironmentDiagnostics { - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. - */ - Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName); - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context); - - /** - * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the diagnostics data for a Managed Environment used to host container apps. - */ - Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java deleted file mode 100644 index dc5d155af761..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Outbound type for the cluster. */ -public final class ManagedEnvironmentOutBoundType extends ExpandableStringEnum { - /** Static value LoadBalancer for ManagedEnvironmentOutBoundType. */ - public static final ManagedEnvironmentOutBoundType LOAD_BALANCER = fromString("LoadBalancer"); - - /** Static value UserDefinedRouting for ManagedEnvironmentOutBoundType. */ - public static final ManagedEnvironmentOutBoundType USER_DEFINED_ROUTING = fromString("UserDefinedRouting"); - - /** - * Creates or finds a ManagedEnvironmentOutBoundType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedEnvironmentOutBoundType. - */ - @JsonCreator - public static ManagedEnvironmentOutBoundType fromString(String name) { - return fromString(name, ManagedEnvironmentOutBoundType.class); - } - - /** - * Gets known ManagedEnvironmentOutBoundType values. - * - * @return known ManagedEnvironmentOutBoundType values. - */ - public static Collection values() { - return values(ManagedEnvironmentOutBoundType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java deleted file mode 100644 index 73594373fa6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration used to control the Environment Egress outbound traffic. */ -@Fluent -public final class ManagedEnvironmentOutboundSettings { - /* - * Outbound type for the cluster - */ - @JsonProperty(value = "outBoundType") - private ManagedEnvironmentOutBoundType outBoundType; - - /* - * Virtual Appliance IP used as the Egress controller for the Environment - */ - @JsonProperty(value = "virtualNetworkApplianceIp") - private String virtualNetworkApplianceIp; - - /** Creates an instance of ManagedEnvironmentOutboundSettings class. */ - public ManagedEnvironmentOutboundSettings() { - } - - /** - * Get the outBoundType property: Outbound type for the cluster. - * - * @return the outBoundType value. - */ - public ManagedEnvironmentOutBoundType outBoundType() { - return this.outBoundType; - } - - /** - * Set the outBoundType property: Outbound type for the cluster. - * - * @param outBoundType the outBoundType value to set. - * @return the ManagedEnvironmentOutboundSettings object itself. - */ - public ManagedEnvironmentOutboundSettings withOutBoundType(ManagedEnvironmentOutBoundType outBoundType) { - this.outBoundType = outBoundType; - return this; - } - - /** - * Get the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the - * Environment. - * - * @return the virtualNetworkApplianceIp value. - */ - public String virtualNetworkApplianceIp() { - return this.virtualNetworkApplianceIp; - } - - /** - * Set the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the - * Environment. - * - * @param virtualNetworkApplianceIp the virtualNetworkApplianceIp value to set. - * @return the ManagedEnvironmentOutboundSettings object itself. - */ - public ManagedEnvironmentOutboundSettings withVirtualNetworkApplianceIp(String virtualNetworkApplianceIp) { - this.virtualNetworkApplianceIp = virtualNetworkApplianceIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java deleted file mode 100644 index d083358ee9c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java +++ /dev/null @@ -1,164 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; - -/** An immutable client-side representation of ManagedEnvironmentStorage. */ -public interface ManagedEnvironmentStorage { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Storage properties. - * - * @return the properties value. - */ - ManagedEnvironmentStorageProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner object. - * - * @return the inner object. - */ - ManagedEnvironmentStorageInner innerModel(); - - /** The entirety of the ManagedEnvironmentStorage definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The ManagedEnvironmentStorage definition stages. */ - interface DefinitionStages { - /** The first stage of the ManagedEnvironmentStorage definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ManagedEnvironmentStorage definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - /** - * The stage of the ManagedEnvironmentStorage definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedEnvironmentStorage create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedEnvironmentStorage create(Context context); - } - /** The stage of the ManagedEnvironmentStorage definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - WithCreate withProperties(ManagedEnvironmentStorageProperties properties); - } - } - /** - * Begins update for the ManagedEnvironmentStorage resource. - * - * @return the stage of resource update. - */ - ManagedEnvironmentStorage.Update update(); - - /** The template for ManagedEnvironmentStorage update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedEnvironmentStorage apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedEnvironmentStorage apply(Context context); - } - /** The ManagedEnvironmentStorage update stages. */ - interface UpdateStages { - /** The stage of the ManagedEnvironmentStorage update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - Update withProperties(ManagedEnvironmentStorageProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedEnvironmentStorage refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedEnvironmentStorage refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java deleted file mode 100644 index 047e29ebf282..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Storage properties. */ -@Fluent -public final class ManagedEnvironmentStorageProperties { - /* - * Azure file properties - */ - @JsonProperty(value = "azureFile") - private AzureFileProperties azureFile; - - /** Creates an instance of ManagedEnvironmentStorageProperties class. */ - public ManagedEnvironmentStorageProperties() { - } - - /** - * Get the azureFile property: Azure file properties. - * - * @return the azureFile value. - */ - public AzureFileProperties azureFile() { - return this.azureFile; - } - - /** - * Set the azureFile property: Azure file properties. - * - * @param azureFile the azureFile value to set. - * @return the ManagedEnvironmentStorageProperties object itself. - */ - public ManagedEnvironmentStorageProperties withAzureFile(AzureFileProperties azureFile) { - this.azureFile = azureFile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureFile() != null) { - azureFile().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java deleted file mode 100644 index c6572a452c8b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java +++ /dev/null @@ -1,26 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import java.util.List; - -/** An immutable client-side representation of ManagedEnvironmentStoragesCollection. */ -public interface ManagedEnvironmentStoragesCollection { - /** - * Gets the value property: Collection of storage resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner - * object. - * - * @return the inner object. - */ - ManagedEnvironmentStoragesCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java deleted file mode 100644 index 313f77bd226b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java +++ /dev/null @@ -1,291 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; - -/** Resource collection API of ManagedEnvironments. */ -public interface ManagedEnvironments { - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String environmentName, Context context); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response}. - */ - Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get auth token for a managed environment - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token. - */ - EnvironmentAuthToken getAuthToken(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - PagedIterable listWorkloadProfileStates(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Premium Managed Environment.. - * - *

Get all workload Profile States for a Premium Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link - * PagedIterable}. - */ - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - ManagedEnvironment getById(String id); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ManagedEnvironment resource. - * - * @param name resource name. - * @return the first stage of the new ManagedEnvironment definition. - */ - ManagedEnvironment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java deleted file mode 100644 index a57a3e082679..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of Environments. */ -@Fluent -public final class ManagedEnvironmentsCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ManagedEnvironmentsCollection class. */ - public ManagedEnvironmentsCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the ManagedEnvironmentsCollection object itself. - */ - public ManagedEnvironmentsCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ManagedEnvironmentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java deleted file mode 100644 index 516893bd6ae0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java +++ /dev/null @@ -1,42 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ManagedEnvironmentsDiagnostics. */ -public interface ManagedEnvironmentsDiagnostics { - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - Response getRootWithResponse(String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - ManagedEnvironment getRoot(String resourceGroupName, String environmentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java deleted file mode 100644 index 4ee96342baee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java +++ /dev/null @@ -1,155 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ManagedEnvironmentsStorages. */ -public interface ManagedEnvironmentsStorages { - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment. - */ - ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String environmentName, String storageName); - - /** - * Get storage for a managedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. - */ - ManagedEnvironmentStorage getById(String id); - - /** - * Get storage for a managedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete storage for a managedEnvironment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ManagedEnvironmentStorage resource. - * - * @param name resource name. - * @return the first stage of the new ManagedEnvironmentStorage definition. - */ - ManagedEnvironmentStorage.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java deleted file mode 100644 index f65a48d3ce27..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,143 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; -import java.util.UUID; - -/** Managed service identity (system assigned and/or user assigned identities). */ -@Fluent -public class ManagedServiceIdentity { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private UUID tenantId; - - /* - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ - @JsonProperty(value = "type", required = true) - private ManagedServiceIdentityType type; - - /* - * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map userAssignedIdentities; - - /** Creates an instance of ManagedServiceIdentity class. */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java deleted file mode 100644 index b06d0fb6ca05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** Static value SystemAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - @JsonCreator - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java deleted file mode 100644 index bf527d3027b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java +++ /dev/null @@ -1,49 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Namespaces. */ -public interface Namespaces { - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); - - /** - * Checks the resource name availability. - * - *

Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java deleted file mode 100644 index 92dfa219b508..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java +++ /dev/null @@ -1,79 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the nonce used in the login flow. */ -@Fluent -public final class Nonce { - /* - * false if the nonce should not be validated while completing the login flow; otherwise, - * true. - */ - @JsonProperty(value = "validateNonce") - private Boolean validateNonce; - - /* - * The time after the request is made when the nonce should expire. - */ - @JsonProperty(value = "nonceExpirationInterval") - private String nonceExpirationInterval; - - /** Creates an instance of Nonce class. */ - public Nonce() { - } - - /** - * Get the validateNonce property: <code>false</code> if the nonce should not be validated while - * completing the login flow; otherwise, <code>true</code>. - * - * @return the validateNonce value. - */ - public Boolean validateNonce() { - return this.validateNonce; - } - - /** - * Set the validateNonce property: <code>false</code> if the nonce should not be validated while - * completing the login flow; otherwise, <code>true</code>. - * - * @param validateNonce the validateNonce value to set. - * @return the Nonce object itself. - */ - public Nonce withValidateNonce(Boolean validateNonce) { - this.validateNonce = validateNonce; - return this; - } - - /** - * Get the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * - * @return the nonceExpirationInterval value. - */ - public String nonceExpirationInterval() { - return this.nonceExpirationInterval; - } - - /** - * Set the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * - * @param nonceExpirationInterval the nonceExpirationInterval value to set. - * @return the Nonce object itself. - */ - public Nonce withNonceExpirationInterval(String nonceExpirationInterval) { - this.nonceExpirationInterval = nonceExpirationInterval; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java deleted file mode 100644 index 2331e42f625e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The authentication client credentials of the custom Open ID Connect provider. */ -@Fluent -public final class OpenIdConnectClientCredential { - /* - * The method that should be used to authenticate the user. - */ - @JsonProperty(value = "method") - private ClientCredentialMethod method; - - /* - * The app setting that contains the client secret for the custom Open ID Connect provider. - */ - @JsonProperty(value = "clientSecretSettingName") - private String clientSecretSettingName; - - /** Creates an instance of OpenIdConnectClientCredential class. */ - public OpenIdConnectClientCredential() { - } - - /** - * Get the method property: The method that should be used to authenticate the user. - * - * @return the method value. - */ - public ClientCredentialMethod method() { - return this.method; - } - - /** - * Set the method property: The method that should be used to authenticate the user. - * - * @param method the method value to set. - * @return the OpenIdConnectClientCredential object itself. - */ - public OpenIdConnectClientCredential withMethod(ClientCredentialMethod method) { - this.method = method; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID - * Connect provider. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID - * Connect provider. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the OpenIdConnectClientCredential object itself. - */ - public OpenIdConnectClientCredential withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java deleted file mode 100644 index 08d9bc0e41fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java +++ /dev/null @@ -1,156 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ -@Fluent -public final class OpenIdConnectConfig { - /* - * The endpoint to be used to make an authorization request. - */ - @JsonProperty(value = "authorizationEndpoint") - private String authorizationEndpoint; - - /* - * The endpoint to be used to request a token. - */ - @JsonProperty(value = "tokenEndpoint") - private String tokenEndpoint; - - /* - * The endpoint that issues the token. - */ - @JsonProperty(value = "issuer") - private String issuer; - - /* - * The endpoint that provides the keys necessary to validate the token. - */ - @JsonProperty(value = "certificationUri") - private String certificationUri; - - /* - * The endpoint that contains all the configuration endpoints for the provider. - */ - @JsonProperty(value = "wellKnownOpenIdConfiguration") - private String wellKnownOpenIdConfiguration; - - /** Creates an instance of OpenIdConnectConfig class. */ - public OpenIdConnectConfig() { - } - - /** - * Get the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * - * @return the authorizationEndpoint value. - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * - * @param authorizationEndpoint the authorizationEndpoint value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the tokenEndpoint property: The endpoint to be used to request a token. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint property: The endpoint to be used to request a token. - * - * @param tokenEndpoint the tokenEndpoint value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the issuer property: The endpoint that issues the token. - * - * @return the issuer value. - */ - public String issuer() { - return this.issuer; - } - - /** - * Set the issuer property: The endpoint that issues the token. - * - * @param issuer the issuer value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withIssuer(String issuer) { - this.issuer = issuer; - return this; - } - - /** - * Get the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * - * @return the certificationUri value. - */ - public String certificationUri() { - return this.certificationUri; - } - - /** - * Set the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * - * @param certificationUri the certificationUri value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withCertificationUri(String certificationUri) { - this.certificationUri = certificationUri; - return this; - } - - /** - * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the - * provider. - * - * @return the wellKnownOpenIdConfiguration value. - */ - public String wellKnownOpenIdConfiguration() { - return this.wellKnownOpenIdConfiguration; - } - - /** - * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the - * provider. - * - * @param wellKnownOpenIdConfiguration the wellKnownOpenIdConfiguration value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withWellKnownOpenIdConfiguration(String wellKnownOpenIdConfiguration) { - this.wellKnownOpenIdConfiguration = wellKnownOpenIdConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java deleted file mode 100644 index 2d5eeaf03614..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration settings of the login flow of the custom Open ID Connect provider. */ -@Fluent -public final class OpenIdConnectLogin { - /* - * The name of the claim that contains the users name. - */ - @JsonProperty(value = "nameClaimType") - private String nameClaimType; - - /* - * A list of the scopes that should be requested while authenticating. - */ - @JsonProperty(value = "scopes") - private List scopes; - - /** Creates an instance of OpenIdConnectLogin class. */ - public OpenIdConnectLogin() { - } - - /** - * Get the nameClaimType property: The name of the claim that contains the users name. - * - * @return the nameClaimType value. - */ - public String nameClaimType() { - return this.nameClaimType; - } - - /** - * Set the nameClaimType property: The name of the claim that contains the users name. - * - * @param nameClaimType the nameClaimType value to set. - * @return the OpenIdConnectLogin object itself. - */ - public OpenIdConnectLogin withNameClaimType(String nameClaimType) { - this.nameClaimType = nameClaimType; - return this; - } - - /** - * Get the scopes property: A list of the scopes that should be requested while authenticating. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: A list of the scopes that should be requested while authenticating. - * - * @param scopes the scopes value to set. - * @return the OpenIdConnectLogin object itself. - */ - public OpenIdConnectLogin withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java deleted file mode 100644 index 85683990f70f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java +++ /dev/null @@ -1,110 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the app registration for the custom Open ID Connect provider. */ -@Fluent -public final class OpenIdConnectRegistration { - /* - * The client id of the custom Open ID Connect provider. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The authentication credentials of the custom Open ID Connect provider. - */ - @JsonProperty(value = "clientCredential") - private OpenIdConnectClientCredential clientCredential; - - /* - * The configuration settings of the endpoints used for the custom Open ID Connect provider. - */ - @JsonProperty(value = "openIdConnectConfiguration") - private OpenIdConnectConfig openIdConnectConfiguration; - - /** Creates an instance of OpenIdConnectRegistration class. */ - public OpenIdConnectRegistration() { - } - - /** - * Get the clientId property: The client id of the custom Open ID Connect provider. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The client id of the custom Open ID Connect provider. - * - * @param clientId the clientId value to set. - * @return the OpenIdConnectRegistration object itself. - */ - public OpenIdConnectRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * - * @return the clientCredential value. - */ - public OpenIdConnectClientCredential clientCredential() { - return this.clientCredential; - } - - /** - * Set the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * - * @param clientCredential the clientCredential value to set. - * @return the OpenIdConnectRegistration object itself. - */ - public OpenIdConnectRegistration withClientCredential(OpenIdConnectClientCredential clientCredential) { - this.clientCredential = clientCredential; - return this; - } - - /** - * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open - * ID Connect provider. - * - * @return the openIdConnectConfiguration value. - */ - public OpenIdConnectConfig openIdConnectConfiguration() { - return this.openIdConnectConfiguration; - } - - /** - * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open - * ID Connect provider. - * - * @param openIdConnectConfiguration the openIdConnectConfiguration value to set. - * @return the OpenIdConnectRegistration object itself. - */ - public OpenIdConnectRegistration withOpenIdConnectConfiguration(OpenIdConnectConfig openIdConnectConfiguration) { - this.openIdConnectConfiguration = openIdConnectConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientCredential() != null) { - clientCredential().validate(); - } - if (openIdConnectConfiguration() != null) { - openIdConnectConfiguration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java deleted file mode 100644 index 1feb34ba8329..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; - -/** An immutable client-side representation of OperationDetail. */ -public interface OperationDetail { - /** - * Gets the name property: Name of the operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Display of the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: Origin of the operation. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner object. - * - * @return the inner object. - */ - OperationDetailInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java deleted file mode 100644 index 2233a26203b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java +++ /dev/null @@ -1,128 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation display payload. */ -@Fluent -public final class OperationDisplay { - /* - * Resource provider of the operation - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource of the operation - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * Localized friendly name for the operation - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * Localized friendly description for the operation - */ - @JsonProperty(value = "description") - private String description; - - /** Creates an instance of OperationDisplay class. */ - public OperationDisplay() { - } - - /** - * Get the provider property: Resource provider of the operation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Resource provider of the operation. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource of the operation. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource of the operation. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Localized friendly name for the operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Localized friendly name for the operation. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Localized friendly description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Localized friendly description for the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java deleted file mode 100644 index d9cf37c1461d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java +++ /dev/null @@ -1,33 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all of the available RP operations. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all of the available RP operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java deleted file mode 100644 index cfbffd1cecb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ /dev/null @@ -1,106 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App container Azure Queue based scaling rule. */ -@Fluent -public final class QueueScaleRule { - /* - * Queue name. - */ - @JsonProperty(value = "queueName") - private String queueName; - - /* - * Queue length. - */ - @JsonProperty(value = "queueLength") - private Integer queueLength; - - /* - * Authentication secrets for the queue scale rule. - */ - @JsonProperty(value = "auth") - private List auth; - - /** Creates an instance of QueueScaleRule class. */ - public QueueScaleRule() { - } - - /** - * Get the queueName property: Queue name. - * - * @return the queueName value. - */ - public String queueName() { - return this.queueName; - } - - /** - * Set the queueName property: Queue name. - * - * @param queueName the queueName value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withQueueName(String queueName) { - this.queueName = queueName; - return this; - } - - /** - * Get the queueLength property: Queue length. - * - * @return the queueLength value. - */ - public Integer queueLength() { - return this.queueLength; - } - - /** - * Set the queueLength property: Queue length. - * - * @param queueLength the queueLength value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withQueueLength(Integer queueLength) { - this.queueLength = queueLength; - return this; - } - - /** - * Get the auth property: Authentication secrets for the queue scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the queue scale rule. - * - * @param auth the auth value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withAuth(List auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java deleted file mode 100644 index bb5b53a159fa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java +++ /dev/null @@ -1,133 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App Private Registry. */ -@Fluent -public final class RegistryCredentials { - /* - * Container Registry Server - */ - @JsonProperty(value = "server") - private String server; - - /* - * Container Registry Username - */ - @JsonProperty(value = "username") - private String username; - - /* - * The name of the Secret that contains the registry login password - */ - @JsonProperty(value = "passwordSecretRef") - private String passwordSecretRef; - - /* - * A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the - * full user-assigned identity Resource ID. For system-assigned identities, use 'system' - */ - @JsonProperty(value = "identity") - private String identity; - - /** Creates an instance of RegistryCredentials class. */ - public RegistryCredentials() { - } - - /** - * Get the server property: Container Registry Server. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Container Registry Server. - * - * @param server the server value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the username property: Container Registry Username. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Container Registry Username. - * - * @param username the username value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the passwordSecretRef property: The name of the Secret that contains the registry login password. - * - * @return the passwordSecretRef value. - */ - public String passwordSecretRef() { - return this.passwordSecretRef; - } - - /** - * Set the passwordSecretRef property: The name of the Secret that contains the registry login password. - * - * @param passwordSecretRef the passwordSecretRef value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withPasswordSecretRef(String passwordSecretRef) { - this.passwordSecretRef = passwordSecretRef; - return this; - } - - /** - * Get the identity property: A Managed Identity to use to authenticate with Azure Container Registry. For - * user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use - * 'system'. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: A Managed Identity to use to authenticate with Azure Container Registry. For - * user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use - * 'system'. - * - * @param identity the identity value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java deleted file mode 100644 index 719abbb378b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App registry information. */ -@Fluent -public final class RegistryInfo { - /* - * registry server Url. - */ - @JsonProperty(value = "registryUrl") - private String registryUrl; - - /* - * registry username. - */ - @JsonProperty(value = "registryUserName") - private String registryUsername; - - /* - * registry secret. - */ - @JsonProperty(value = "registryPassword") - private String registryPassword; - - /** Creates an instance of RegistryInfo class. */ - public RegistryInfo() { - } - - /** - * Get the registryUrl property: registry server Url. - * - * @return the registryUrl value. - */ - public String registryUrl() { - return this.registryUrl; - } - - /** - * Set the registryUrl property: registry server Url. - * - * @param registryUrl the registryUrl value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryUrl(String registryUrl) { - this.registryUrl = registryUrl; - return this; - } - - /** - * Get the registryUsername property: registry username. - * - * @return the registryUsername value. - */ - public String registryUsername() { - return this.registryUsername; - } - - /** - * Set the registryUsername property: registry username. - * - * @param registryUsername the registryUsername value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryUsername(String registryUsername) { - this.registryUsername = registryUsername; - return this; - } - - /** - * Get the registryPassword property: registry secret. - * - * @return the registryPassword value. - */ - public String registryPassword() { - return this.registryPassword; - } - - /** - * Set the registryPassword property: registry secret. - * - * @param registryPassword the registryPassword value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryPassword(String registryPassword) { - this.registryPassword = registryPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java deleted file mode 100644 index 230bb1db0a43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java +++ /dev/null @@ -1,62 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Replica. */ -public interface Replica { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - OffsetDateTime createdTime(); - - /** - * Gets the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - List containers(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner object. - * - * @return the inner object. - */ - ReplicaInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java deleted file mode 100644 index a0ccd84658a1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java +++ /dev/null @@ -1,25 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import java.util.List; - -/** An immutable client-side representation of ReplicaCollection. */ -public interface ReplicaCollection { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner object. - * - * @return the inner object. - */ - ReplicaCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java deleted file mode 100644 index cc5137a779d8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java +++ /dev/null @@ -1,184 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container object under Container App Revision Replica. */ -@Fluent -public final class ReplicaContainer { - /* - * The Name of the Container - */ - @JsonProperty(value = "name") - private String name; - - /* - * The Id of the Container - */ - @JsonProperty(value = "containerId") - private String containerId; - - /* - * The container ready status - */ - @JsonProperty(value = "ready") - private Boolean ready; - - /* - * The container start status - */ - @JsonProperty(value = "started") - private Boolean started; - - /* - * The container restart count - */ - @JsonProperty(value = "restartCount") - private Integer restartCount; - - /* - * Log Stream endpoint - */ - @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String logStreamEndpoint; - - /* - * Container exec endpoint - */ - @JsonProperty(value = "execEndpoint", access = JsonProperty.Access.WRITE_ONLY) - private String execEndpoint; - - /** Creates an instance of ReplicaContainer class. */ - public ReplicaContainer() { - } - - /** - * Get the name property: The Name of the Container. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The Name of the Container. - * - * @param name the name value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the containerId property: The Id of the Container. - * - * @return the containerId value. - */ - public String containerId() { - return this.containerId; - } - - /** - * Set the containerId property: The Id of the Container. - * - * @param containerId the containerId value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withContainerId(String containerId) { - this.containerId = containerId; - return this; - } - - /** - * Get the ready property: The container ready status. - * - * @return the ready value. - */ - public Boolean ready() { - return this.ready; - } - - /** - * Set the ready property: The container ready status. - * - * @param ready the ready value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withReady(Boolean ready) { - this.ready = ready; - return this; - } - - /** - * Get the started property: The container start status. - * - * @return the started value. - */ - public Boolean started() { - return this.started; - } - - /** - * Set the started property: The container start status. - * - * @param started the started value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withStarted(Boolean started) { - this.started = started; - return this; - } - - /** - * Get the restartCount property: The container restart count. - * - * @return the restartCount value. - */ - public Integer restartCount() { - return this.restartCount; - } - - /** - * Set the restartCount property: The container restart count. - * - * @param restartCount the restartCount value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withRestartCount(Integer restartCount) { - this.restartCount = restartCount; - return this; - } - - /** - * Get the logStreamEndpoint property: Log Stream endpoint. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.logStreamEndpoint; - } - - /** - * Get the execEndpoint property: Container exec endpoint. - * - * @return the execEndpoint value. - */ - public String execEndpoint() { - return this.execEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java deleted file mode 100644 index 8faab8b965f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ /dev/null @@ -1,119 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of Revision. */ -public interface Revision { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the createdTime property: Timestamp describing when the revision was created by controller. - * - * @return the createdTime value. - */ - OffsetDateTime createdTime(); - - /** - * Gets the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - OffsetDateTime lastActiveTime(); - - /** - * Gets the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - String fqdn(); - - /** - * Gets the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * - * @return the template value. - */ - Template template(); - - /** - * Gets the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - Boolean active(); - - /** - * Gets the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - Integer replicas(); - - /** - * Gets the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - Integer trafficWeight(); - - /** - * Gets the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - String provisioningError(); - - /** - * Gets the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - RevisionHealthState healthState(); - - /** - * Gets the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - RevisionProvisioningState provisioningState(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner object. - * - * @return the inner object. - */ - RevisionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java deleted file mode 100644 index 18b8b90d9908..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App Revisions collection ARM resource. */ -@Fluent -public final class RevisionCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of RevisionCollection class. */ - public RevisionCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the RevisionCollection object itself. - */ - public RevisionCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model RevisionCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RevisionCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java deleted file mode 100644 index dc40a43691f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Current health State of the revision. */ -public final class RevisionHealthState extends ExpandableStringEnum { - /** Static value Healthy for RevisionHealthState. */ - public static final RevisionHealthState HEALTHY = fromString("Healthy"); - - /** Static value Unhealthy for RevisionHealthState. */ - public static final RevisionHealthState UNHEALTHY = fromString("Unhealthy"); - - /** Static value None for RevisionHealthState. */ - public static final RevisionHealthState NONE = fromString("None"); - - /** - * Creates or finds a RevisionHealthState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RevisionHealthState. - */ - @JsonCreator - public static RevisionHealthState fromString(String name) { - return fromString(name, RevisionHealthState.class); - } - - /** - * Gets known RevisionHealthState values. - * - * @return known RevisionHealthState values. - */ - public static Collection values() { - return values(RevisionHealthState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java deleted file mode 100644 index 5f5205cd2321..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java +++ /dev/null @@ -1,47 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Current provisioning State of the revision. */ -public final class RevisionProvisioningState extends ExpandableStringEnum { - /** Static value Provisioning for RevisionProvisioningState. */ - public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); - - /** Static value Provisioned for RevisionProvisioningState. */ - public static final RevisionProvisioningState PROVISIONED = fromString("Provisioned"); - - /** Static value Failed for RevisionProvisioningState. */ - public static final RevisionProvisioningState FAILED = fromString("Failed"); - - /** Static value Deprovisioning for RevisionProvisioningState. */ - public static final RevisionProvisioningState DEPROVISIONING = fromString("Deprovisioning"); - - /** Static value Deprovisioned for RevisionProvisioningState. */ - public static final RevisionProvisioningState DEPROVISIONED = fromString("Deprovisioned"); - - /** - * Creates or finds a RevisionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RevisionProvisioningState. - */ - @JsonCreator - public static RevisionProvisioningState fromString(String name) { - return fromString(name, RevisionProvisioningState.class); - } - - /** - * Gets known RevisionProvisioningState values. - * - * @return known RevisionProvisioningState values. - */ - public static Collection values() { - return values(RevisionProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java deleted file mode 100644 index 4880d5368288..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java +++ /dev/null @@ -1,106 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App scaling configurations. */ -@Fluent -public final class Scale { - /* - * Optional. Minimum number of container replicas. - */ - @JsonProperty(value = "minReplicas") - private Integer minReplicas; - - /* - * Optional. Maximum number of container replicas. Defaults to 10 if not set. - */ - @JsonProperty(value = "maxReplicas") - private Integer maxReplicas; - - /* - * Scaling rules. - */ - @JsonProperty(value = "rules") - private List rules; - - /** Creates an instance of Scale class. */ - public Scale() { - } - - /** - * Get the minReplicas property: Optional. Minimum number of container replicas. - * - * @return the minReplicas value. - */ - public Integer minReplicas() { - return this.minReplicas; - } - - /** - * Set the minReplicas property: Optional. Minimum number of container replicas. - * - * @param minReplicas the minReplicas value to set. - * @return the Scale object itself. - */ - public Scale withMinReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; - return this; - } - - /** - * Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * - * @return the maxReplicas value. - */ - public Integer maxReplicas() { - return this.maxReplicas; - } - - /** - * Set the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * - * @param maxReplicas the maxReplicas value to set. - * @return the Scale object itself. - */ - public Scale withMaxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; - return this; - } - - /** - * Get the rules property: Scaling rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: Scaling rules. - * - * @param rules the rules value to set. - * @return the Scale object itself. - */ - public Scale withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java deleted file mode 100644 index 7072b43fc40b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java +++ /dev/null @@ -1,166 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Container App container scaling rule. */ -@Fluent -public final class ScaleRule { - /* - * Scale Rule Name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Azure Queue based scaling. - */ - @JsonProperty(value = "azureQueue") - private QueueScaleRule azureQueue; - - /* - * Custom scale rule. - */ - @JsonProperty(value = "custom") - private CustomScaleRule custom; - - /* - * HTTP requests based scaling. - */ - @JsonProperty(value = "http") - private HttpScaleRule http; - - /* - * Tcp requests based scaling. - */ - @JsonProperty(value = "tcp") - private TcpScaleRule tcp; - - /** Creates an instance of ScaleRule class. */ - public ScaleRule() { - } - - /** - * Get the name property: Scale Rule Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Scale Rule Name. - * - * @param name the name value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the azureQueue property: Azure Queue based scaling. - * - * @return the azureQueue value. - */ - public QueueScaleRule azureQueue() { - return this.azureQueue; - } - - /** - * Set the azureQueue property: Azure Queue based scaling. - * - * @param azureQueue the azureQueue value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withAzureQueue(QueueScaleRule azureQueue) { - this.azureQueue = azureQueue; - return this; - } - - /** - * Get the custom property: Custom scale rule. - * - * @return the custom value. - */ - public CustomScaleRule custom() { - return this.custom; - } - - /** - * Set the custom property: Custom scale rule. - * - * @param custom the custom value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withCustom(CustomScaleRule custom) { - this.custom = custom; - return this; - } - - /** - * Get the http property: HTTP requests based scaling. - * - * @return the http value. - */ - public HttpScaleRule http() { - return this.http; - } - - /** - * Set the http property: HTTP requests based scaling. - * - * @param http the http value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withHttp(HttpScaleRule http) { - this.http = http; - return this; - } - - /** - * Get the tcp property: Tcp requests based scaling. - * - * @return the tcp value. - */ - public TcpScaleRule tcp() { - return this.tcp; - } - - /** - * Set the tcp property: Tcp requests based scaling. - * - * @param tcp the tcp value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withTcp(TcpScaleRule tcp) { - this.tcp = tcp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureQueue() != null) { - azureQueue().validate(); - } - if (custom() != null) { - custom().validate(); - } - if (http() != null) { - http().validate(); - } - if (tcp() != null) { - tcp().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java deleted file mode 100644 index 417502d90267..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Auth Secrets for Container App Scale Rule. */ -@Fluent -public final class ScaleRuleAuth { - /* - * Name of the Container App secret from which to pull the auth params. - */ - @JsonProperty(value = "secretRef") - private String secretRef; - - /* - * Trigger Parameter that uses the secret - */ - @JsonProperty(value = "triggerParameter") - private String triggerParameter; - - /** Creates an instance of ScaleRuleAuth class. */ - public ScaleRuleAuth() { - } - - /** - * Get the secretRef property: Name of the Container App secret from which to pull the auth params. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Container App secret from which to pull the auth params. - * - * @param secretRef the secretRef value to set. - * @return the ScaleRuleAuth object itself. - */ - public ScaleRuleAuth withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Get the triggerParameter property: Trigger Parameter that uses the secret. - * - * @return the triggerParameter value. - */ - public String triggerParameter() { - return this.triggerParameter; - } - - /** - * Set the triggerParameter property: Trigger Parameter that uses the secret. - * - * @param triggerParameter the triggerParameter value to set. - * @return the ScaleRuleAuth object itself. - */ - public ScaleRuleAuth withTriggerParameter(String triggerParameter) { - this.triggerParameter = triggerParameter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java deleted file mode 100644 index a6818740846a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Scheme to use for connecting to the host. Defaults to HTTP. */ -public final class Scheme extends ExpandableStringEnum { - /** Static value HTTP for Scheme. */ - public static final Scheme HTTP = fromString("HTTP"); - - /** Static value HTTPS for Scheme. */ - public static final Scheme HTTPS = fromString("HTTPS"); - - /** - * Creates or finds a Scheme from its string representation. - * - * @param name a name to look for. - * @return the corresponding Scheme. - */ - @JsonCreator - public static Scheme fromString(String name) { - return fromString(name, Scheme.class); - } - - /** - * Gets known Scheme values. - * - * @return known Scheme values. - */ - public static Collection values() { - return values(Scheme.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java deleted file mode 100644 index 664ee95339c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Secret definition. */ -@Fluent -public final class Secret { - /* - * Secret Name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Secret Value. - */ - @JsonProperty(value = "value") - private String value; - - /** Creates an instance of Secret class. */ - public Secret() { - } - - /** - * Get the name property: Secret Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Secret Name. - * - * @param name the name value to set. - * @return the Secret object itself. - */ - public Secret withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Secret Value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Secret Value. - * - * @param value the value value to set. - * @return the Secret object itself. - */ - public Secret withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java deleted file mode 100644 index cb2a5d815cb4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java +++ /dev/null @@ -1,25 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import java.util.List; - -/** An immutable client-side representation of SecretsCollection. */ -public interface SecretsCollection { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner object. - * - * @return the inner object. - */ - SecretsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java deleted file mode 100644 index 2f9018c8ebff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Name of the Sku. */ -public final class SkuName extends ExpandableStringEnum { - /** Static value Consumption for SkuName. */ - public static final SkuName CONSUMPTION = fromString("Consumption"); - - /** Static value Premium for SkuName. */ - public static final SkuName PREMIUM = fromString("Premium"); - - /** - * Creates or finds a SkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuName. - */ - @JsonCreator - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** - * Gets known SkuName values. - * - * @return known SkuName values. - */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java deleted file mode 100644 index 187120ae66d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java +++ /dev/null @@ -1,236 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; - -/** An immutable client-side representation of SourceControl. */ -public interface SourceControl { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - SourceControlOperationState operationState(); - - /** - * Gets the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - String repoUrl(); - - /** - * Gets the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - String branch(); - - /** - * Gets the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - GithubActionConfiguration githubActionConfiguration(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner object. - * - * @return the inner object. - */ - SourceControlInner innerModel(); - - /** The entirety of the SourceControl definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The SourceControl definition stages. */ - interface DefinitionStages { - /** The first stage of the SourceControl definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the SourceControl definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - /** - * The stage of the SourceControl definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithRepoUrl, - DefinitionStages.WithBranch, - DefinitionStages.WithGithubActionConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - SourceControl create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SourceControl create(Context context); - } - /** The stage of the SourceControl definition allowing to specify repoUrl. */ - interface WithRepoUrl { - /** - * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * - * @param repoUrl The repo url which will be integrated to ContainerApp. - * @return the next definition stage. - */ - WithCreate withRepoUrl(String repoUrl); - } - /** The stage of the SourceControl definition allowing to specify branch. */ - interface WithBranch { - /** - * Specifies the branch property: The branch which will trigger the auto deployment. - * - * @param branch The branch which will trigger the auto deployment. - * @return the next definition stage. - */ - WithCreate withBranch(String branch); - } - /** The stage of the SourceControl definition allowing to specify githubActionConfiguration. */ - interface WithGithubActionConfiguration { - /** - * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the defaults if user did not provide them. The defaults are populated as they were at the - * creation time. - * - * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * @return the next definition stage. - */ - WithCreate withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); - } - } - /** - * Begins update for the SourceControl resource. - * - * @return the stage of resource update. - */ - SourceControl.Update update(); - - /** The template for SourceControl update. */ - interface Update - extends UpdateStages.WithRepoUrl, UpdateStages.WithBranch, UpdateStages.WithGithubActionConfiguration { - /** - * Executes the update request. - * - * @return the updated resource. - */ - SourceControl apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - SourceControl apply(Context context); - } - /** The SourceControl update stages. */ - interface UpdateStages { - /** The stage of the SourceControl update allowing to specify repoUrl. */ - interface WithRepoUrl { - /** - * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * - * @param repoUrl The repo url which will be integrated to ContainerApp. - * @return the next definition stage. - */ - Update withRepoUrl(String repoUrl); - } - /** The stage of the SourceControl update allowing to specify branch. */ - interface WithBranch { - /** - * Specifies the branch property: The branch which will trigger the auto deployment. - * - * @param branch The branch which will trigger the auto deployment. - * @return the next definition stage. - */ - Update withBranch(String branch); - } - /** The stage of the SourceControl update allowing to specify githubActionConfiguration. */ - interface WithGithubActionConfiguration { - /** - * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the defaults if user did not provide them. The defaults are populated as they were at the - * creation time. - * - * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * @return the next definition stage. - */ - Update withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - SourceControl refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SourceControl refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java deleted file mode 100644 index ba48d5e1579d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** SourceControl collection ARM resource. */ -@Fluent -public final class SourceControlCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of SourceControlCollection class. */ - public SourceControlCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the SourceControlCollection object itself. - */ - public SourceControlCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SourceControlCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java deleted file mode 100644 index e99c063b3a2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java +++ /dev/null @@ -1,44 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Current provisioning State of the operation. */ -public final class SourceControlOperationState extends ExpandableStringEnum { - /** Static value InProgress for SourceControlOperationState. */ - public static final SourceControlOperationState IN_PROGRESS = fromString("InProgress"); - - /** Static value Succeeded for SourceControlOperationState. */ - public static final SourceControlOperationState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for SourceControlOperationState. */ - public static final SourceControlOperationState FAILED = fromString("Failed"); - - /** Static value Canceled for SourceControlOperationState. */ - public static final SourceControlOperationState CANCELED = fromString("Canceled"); - - /** - * Creates or finds a SourceControlOperationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceControlOperationState. - */ - @JsonCreator - public static SourceControlOperationState fromString(String name) { - return fromString(name, SourceControlOperationState.class); - } - - /** - * Gets known SourceControlOperationState values. - * - * @return known SourceControlOperationState values. - */ - public static Collection values() { - return values(SourceControlOperationState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java deleted file mode 100644 index e1887e683715..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Storage type for the volume. If not provided, use EmptyDir. */ -public final class StorageType extends ExpandableStringEnum { - /** Static value AzureFile for StorageType. */ - public static final StorageType AZURE_FILE = fromString("AzureFile"); - - /** Static value EmptyDir for StorageType. */ - public static final StorageType EMPTY_DIR = fromString("EmptyDir"); - - /** - * Creates or finds a StorageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageType. - */ - @JsonCreator - public static StorageType fromString(String name) { - return fromString(name, StorageType.class); - } - - /** - * Gets known StorageType values. - * - * @return known StorageType values. - */ - public static Collection values() { - return values(StorageType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java deleted file mode 100644 index f297d3d3bf85..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java +++ /dev/null @@ -1,83 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Container App container Tcp scaling rule. */ -@Fluent -public final class TcpScaleRule { - /* - * Metadata properties to describe tcp scale rule. - */ - @JsonProperty(value = "metadata") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map metadata; - - /* - * Authentication secrets for the tcp scale rule. - */ - @JsonProperty(value = "auth") - private List auth; - - /** Creates an instance of TcpScaleRule class. */ - public TcpScaleRule() { - } - - /** - * Get the metadata property: Metadata properties to describe tcp scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe tcp scale rule. - * - * @param metadata the metadata value to set. - * @return the TcpScaleRule object itself. - */ - public TcpScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the tcp scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the tcp scale rule. - * - * @param auth the auth value to set. - * @return the TcpScaleRule object itself. - */ - public TcpScaleRule withAuth(List auth) { - this.auth = auth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java deleted file mode 100644 index e4bc9d02cee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ /dev/null @@ -1,170 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to - * this section Will result in a new revision being created. - */ -@Fluent -public final class Template { - /* - * User friendly suffix that is appended to the revision name - */ - @JsonProperty(value = "revisionSuffix") - private String revisionSuffix; - - /* - * List of specialized containers that run before app containers. - */ - @JsonProperty(value = "initContainers") - private List initContainers; - - /* - * List of container definitions for the Container App. - */ - @JsonProperty(value = "containers") - private List containers; - - /* - * Scaling properties for the Container App. - */ - @JsonProperty(value = "scale") - private Scale scale; - - /* - * List of volume definitions for the Container App. - */ - @JsonProperty(value = "volumes") - private List volumes; - - /** Creates an instance of Template class. */ - public Template() { - } - - /** - * Get the revisionSuffix property: User friendly suffix that is appended to the revision name. - * - * @return the revisionSuffix value. - */ - public String revisionSuffix() { - return this.revisionSuffix; - } - - /** - * Set the revisionSuffix property: User friendly suffix that is appended to the revision name. - * - * @param revisionSuffix the revisionSuffix value to set. - * @return the Template object itself. - */ - public Template withRevisionSuffix(String revisionSuffix) { - this.revisionSuffix = revisionSuffix; - return this; - } - - /** - * Get the initContainers property: List of specialized containers that run before app containers. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.initContainers; - } - - /** - * Set the initContainers property: List of specialized containers that run before app containers. - * - * @param initContainers the initContainers value to set. - * @return the Template object itself. - */ - public Template withInitContainers(List initContainers) { - this.initContainers = initContainers; - return this; - } - - /** - * Get the containers property: List of container definitions for the Container App. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: List of container definitions for the Container App. - * - * @param containers the containers value to set. - * @return the Template object itself. - */ - public Template withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Get the scale property: Scaling properties for the Container App. - * - * @return the scale value. - */ - public Scale scale() { - return this.scale; - } - - /** - * Set the scale property: Scaling properties for the Container App. - * - * @param scale the scale value to set. - * @return the Template object itself. - */ - public Template withScale(Scale scale) { - this.scale = scale; - return this; - } - - /** - * Get the volumes property: List of volume definitions for the Container App. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: List of volume definitions for the Container App. - * - * @param volumes the volumes value to set. - * @return the Template object itself. - */ - public Template withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (initContainers() != null) { - initContainers().forEach(e -> e.validate()); - } - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java deleted file mode 100644 index bf509ea5c3ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java +++ /dev/null @@ -1,128 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Traffic weight assigned to a revision. */ -@Fluent -public final class TrafficWeight { - /* - * Name of a revision - */ - @JsonProperty(value = "revisionName") - private String revisionName; - - /* - * Traffic weight assigned to a revision - */ - @JsonProperty(value = "weight") - private Integer weight; - - /* - * Indicates that the traffic weight belongs to a latest stable revision - */ - @JsonProperty(value = "latestRevision") - private Boolean latestRevision; - - /* - * Associates a traffic label with a revision - */ - @JsonProperty(value = "label") - private String label; - - /** Creates an instance of TrafficWeight class. */ - public TrafficWeight() { - } - - /** - * Get the revisionName property: Name of a revision. - * - * @return the revisionName value. - */ - public String revisionName() { - return this.revisionName; - } - - /** - * Set the revisionName property: Name of a revision. - * - * @param revisionName the revisionName value to set. - * @return the TrafficWeight object itself. - */ - public TrafficWeight withRevisionName(String revisionName) { - this.revisionName = revisionName; - return this; - } - - /** - * Get the weight property: Traffic weight assigned to a revision. - * - * @return the weight value. - */ - public Integer weight() { - return this.weight; - } - - /** - * Set the weight property: Traffic weight assigned to a revision. - * - * @param weight the weight value to set. - * @return the TrafficWeight object itself. - */ - public TrafficWeight withWeight(Integer weight) { - this.weight = weight; - return this; - } - - /** - * Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. - * - * @return the latestRevision value. - */ - public Boolean latestRevision() { - return this.latestRevision; - } - - /** - * Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. - * - * @param latestRevision the latestRevision value to set. - * @return the TrafficWeight object itself. - */ - public TrafficWeight withLatestRevision(Boolean latestRevision) { - this.latestRevision = latestRevision; - return this; - } - - /** - * Get the label property: Associates a traffic label with a revision. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: Associates a traffic label with a revision. - * - * @param label the label value to set. - * @return the TrafficWeight object itself. - */ - public TrafficWeight withLabel(String label) { - this.label = label; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java deleted file mode 100644 index 2cd7a0a5a635..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java +++ /dev/null @@ -1,82 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the Twitter provider. */ -@Fluent -public final class Twitter { - /* - * false if the Twitter provider should not be enabled despite the set registration; otherwise, - * true. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The configuration settings of the app registration for the Twitter provider. - */ - @JsonProperty(value = "registration") - private TwitterRegistration registration; - - /** Creates an instance of Twitter class. */ - public Twitter() { - } - - /** - * Get the enabled property: <code>false</code> if the Twitter provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Twitter provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Twitter object itself. - */ - public Twitter withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the Twitter provider. - * - * @return the registration value. - */ - public TwitterRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the Twitter provider. - * - * @param registration the registration value to set. - * @return the Twitter object itself. - */ - public Twitter withRegistration(TwitterRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java deleted file mode 100644 index 26f1599daa13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java +++ /dev/null @@ -1,85 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The configuration settings of the app registration for the Twitter provider. */ -@Fluent -public final class TwitterRegistration { - /* - * The OAuth 1.0a consumer key of the Twitter application used for sign-in. - * This setting is required for enabling Twitter Sign-In. - * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - */ - @JsonProperty(value = "consumerKey") - private String consumerKey; - - /* - * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter - * application used for sign-in. - */ - @JsonProperty(value = "consumerSecretSettingName") - private String consumerSecretSettingName; - - /** Creates an instance of TwitterRegistration class. */ - public TwitterRegistration() { - } - - /** - * Get the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This - * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: - * https://dev.twitter.com/web/sign-in. - * - * @return the consumerKey value. - */ - public String consumerKey() { - return this.consumerKey; - } - - /** - * Set the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This - * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: - * https://dev.twitter.com/web/sign-in. - * - * @param consumerKey the consumerKey value to set. - * @return the TwitterRegistration object itself. - */ - public TwitterRegistration withConsumerKey(String consumerKey) { - this.consumerKey = consumerKey; - return this; - } - - /** - * Get the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of - * the Twitter application used for sign-in. - * - * @return the consumerSecretSettingName value. - */ - public String consumerSecretSettingName() { - return this.consumerSecretSettingName; - } - - /** - * Set the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of - * the Twitter application used for sign-in. - * - * @param consumerSecretSettingName the consumerSecretSettingName value to set. - * @return the TwitterRegistration object itself. - */ - public TwitterRegistration withConsumerSecretSettingName(String consumerSecretSettingName) { - this.consumerSecretSettingName = consumerSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java deleted file mode 100644 index f6780b693f9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The type of probe. */ -public final class Type extends ExpandableStringEnum { - /** Static value Liveness for Type. */ - public static final Type LIVENESS = fromString("Liveness"); - - /** Static value Readiness for Type. */ - public static final Type READINESS = fromString("Readiness"); - - /** Static value Startup for Type. */ - public static final Type STARTUP = fromString("Startup"); - - /** - * Creates or finds a Type from its string representation. - * - * @param name a name to look for. - * @return the corresponding Type. - */ - @JsonCreator - public static Type fromString(String name) { - return fromString(name, Type.class); - } - - /** - * Gets known Type values. - * - * @return known Type values. - */ - public static Collection values() { - return values(Type.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java deleted file mode 100644 index 0cc5de4ca521..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java +++ /dev/null @@ -1,57 +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.appcontainers.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The action to take when an unauthenticated client attempts to access the app. */ -public enum UnauthenticatedClientActionV2 { - /** Enum value RedirectToLoginPage. */ - REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), - - /** Enum value AllowAnonymous. */ - ALLOW_ANONYMOUS("AllowAnonymous"), - - /** Enum value Return401. */ - RETURN401("Return401"), - - /** Enum value Return403. */ - RETURN403("Return403"); - - /** The actual serialized value for a UnauthenticatedClientActionV2 instance. */ - private final String value; - - UnauthenticatedClientActionV2(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a UnauthenticatedClientActionV2 instance. - * - * @param value the serialized value to parse. - * @return the parsed UnauthenticatedClientActionV2 object, or null if unable to parse. - */ - @JsonCreator - public static UnauthenticatedClientActionV2 fromString(String value) { - if (value == null) { - return null; - } - UnauthenticatedClientActionV2[] items = UnauthenticatedClientActionV2.values(); - for (UnauthenticatedClientActionV2 item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java deleted file mode 100644 index 0078780653c5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java +++ /dev/null @@ -1,55 +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.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** User assigned identity properties. */ -@Immutable -public class UserAssignedIdentity { - /* - * The principal ID of the assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /* - * The client ID of the assigned identity. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private UUID clientId; - - /** Creates an instance of UserAssignedIdentity class. */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java deleted file mode 100644 index 411c85b2c65a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java +++ /dev/null @@ -1,231 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration properties for apps environment to join a Virtual Network. */ -@Fluent -public final class VnetConfiguration { - /* - * Boolean indicating the environment only has an internal load balancer. These environments do not have a public - * static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property - */ - @JsonProperty(value = "internal") - private Boolean internal; - - /* - * Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet - * defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. - */ - @JsonProperty(value = "infrastructureSubnetId") - private String infrastructureSubnetId; - - /* - * Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as - * the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. - */ - @JsonProperty(value = "runtimeSubnetId") - private String runtimeSubnetId; - - /* - * CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP - * ranges. - */ - @JsonProperty(value = "dockerBridgeCidr") - private String dockerBridgeCidr; - - /* - * IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap - * with any other provided IP ranges. - */ - @JsonProperty(value = "platformReservedCidr") - private String platformReservedCidr; - - /* - * An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS - * server. - */ - @JsonProperty(value = "platformReservedDnsIP") - private String platformReservedDnsIp; - - /* - * Configuration used to control the Environment Egress outbound traffic - */ - @JsonProperty(value = "outboundSettings") - private ManagedEnvironmentOutboundSettings outboundSettings; - - /** Creates an instance of VnetConfiguration class. */ - public VnetConfiguration() { - } - - /** - * Get the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource. They must provide runtimeSubnetId and - * infrastructureSubnetId if enabling this property. - * - * @return the internal value. - */ - public Boolean internal() { - return this.internal; - } - - /** - * Set the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource. They must provide runtimeSubnetId and - * infrastructureSubnetId if enabling this property. - * - * @param internal the internal value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withInternal(Boolean internal) { - this.internal = internal; - return this; - } - - /** - * Get the infrastructureSubnetId property: Resource ID of a subnet for infrastructure components. This subnet must - * be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. - * - * @return the infrastructureSubnetId value. - */ - public String infrastructureSubnetId() { - return this.infrastructureSubnetId; - } - - /** - * Set the infrastructureSubnetId property: Resource ID of a subnet for infrastructure components. This subnet must - * be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. - * - * @param infrastructureSubnetId the infrastructureSubnetId value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withInfrastructureSubnetId(String infrastructureSubnetId) { - this.infrastructureSubnetId = infrastructureSubnetId; - return this; - } - - /** - * Get the runtimeSubnetId property: Resource ID of a subnet that Container App containers are injected into. This - * subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other - * provided IP ranges. - * - * @return the runtimeSubnetId value. - */ - public String runtimeSubnetId() { - return this.runtimeSubnetId; - } - - /** - * Set the runtimeSubnetId property: Resource ID of a subnet that Container App containers are injected into. This - * subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other - * provided IP ranges. - * - * @param runtimeSubnetId the runtimeSubnetId value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withRuntimeSubnetId(String runtimeSubnetId) { - this.runtimeSubnetId = runtimeSubnetId; - return this; - } - - /** - * Get the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge, network. Must not - * overlap with any other provided IP ranges. - * - * @return the dockerBridgeCidr value. - */ - public String dockerBridgeCidr() { - return this.dockerBridgeCidr; - } - - /** - * Set the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge, network. Must not - * overlap with any other provided IP ranges. - * - * @param dockerBridgeCidr the dockerBridgeCidr value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { - this.dockerBridgeCidr = dockerBridgeCidr; - return this; - } - - /** - * Get the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment - * infrastructure IP addresses. Must not overlap with any other provided IP ranges. - * - * @return the platformReservedCidr value. - */ - public String platformReservedCidr() { - return this.platformReservedCidr; - } - - /** - * Set the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment - * infrastructure IP addresses. Must not overlap with any other provided IP ranges. - * - * @param platformReservedCidr the platformReservedCidr value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withPlatformReservedCidr(String platformReservedCidr) { - this.platformReservedCidr = platformReservedCidr; - return this; - } - - /** - * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will - * be reserved for the internal DNS server. - * - * @return the platformReservedDnsIp value. - */ - public String platformReservedDnsIp() { - return this.platformReservedDnsIp; - } - - /** - * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will - * be reserved for the internal DNS server. - * - * @param platformReservedDnsIp the platformReservedDnsIp value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withPlatformReservedDnsIp(String platformReservedDnsIp) { - this.platformReservedDnsIp = platformReservedDnsIp; - return this; - } - - /** - * Get the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. - * - * @return the outboundSettings value. - */ - public ManagedEnvironmentOutboundSettings outboundSettings() { - return this.outboundSettings; - } - - /** - * Set the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. - * - * @param outboundSettings the outboundSettings value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withOutboundSettings(ManagedEnvironmentOutboundSettings outboundSettings) { - this.outboundSettings = outboundSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (outboundSettings() != null) { - outboundSettings().validate(); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java deleted file mode 100644 index 63d746c6e0b4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume definitions for the Container App. */ -@Fluent -public final class Volume { - /* - * Volume name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Storage type for the volume. If not provided, use EmptyDir. - */ - @JsonProperty(value = "storageType") - private StorageType storageType; - - /* - * Name of storage resource. No need to provide for EmptyDir. - */ - @JsonProperty(value = "storageName") - private String storageName; - - /** Creates an instance of Volume class. */ - public Volume() { - } - - /** - * Get the name property: Volume name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Volume name. - * - * @param name the name value to set. - * @return the Volume object itself. - */ - public Volume withName(String name) { - this.name = name; - return this; - } - - /** - * Get the storageType property: Storage type for the volume. If not provided, use EmptyDir. - * - * @return the storageType value. - */ - public StorageType storageType() { - return this.storageType; - } - - /** - * Set the storageType property: Storage type for the volume. If not provided, use EmptyDir. - * - * @param storageType the storageType value to set. - * @return the Volume object itself. - */ - public Volume withStorageType(StorageType storageType) { - this.storageType = storageType; - return this; - } - - /** - * Get the storageName property: Name of storage resource. No need to provide for EmptyDir. - * - * @return the storageName value. - */ - public String storageName() { - return this.storageName; - } - - /** - * Set the storageName property: Name of storage resource. No need to provide for EmptyDir. - * - * @param storageName the storageName value to set. - * @return the Volume object itself. - */ - public Volume withStorageName(String storageName) { - this.storageName = storageName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java deleted file mode 100644 index d0bcf4169241..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Volume mount for the Container App. */ -@Fluent -public final class VolumeMount { - /* - * This must match the Name of a Volume. - */ - @JsonProperty(value = "volumeName") - private String volumeName; - - /* - * Path within the container at which the volume should be mounted.Must not contain ':'. - */ - @JsonProperty(value = "mountPath") - private String mountPath; - - /** Creates an instance of VolumeMount class. */ - public VolumeMount() { - } - - /** - * Get the volumeName property: This must match the Name of a Volume. - * - * @return the volumeName value. - */ - public String volumeName() { - return this.volumeName; - } - - /** - * Set the volumeName property: This must match the Name of a Volume. - * - * @param volumeName the volumeName value to set. - * @return the VolumeMount object itself. - */ - public VolumeMount withVolumeName(String volumeName) { - this.volumeName = volumeName; - return this; - } - - /** - * Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. - * - * @return the mountPath value. - */ - public String mountPath() { - return this.mountPath; - } - - /** - * Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. - * - * @param mountPath the mountPath value to set. - * @return the VolumeMount object itself. - */ - public VolumeMount withMountPath(String mountPath) { - this.mountPath = mountPath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java deleted file mode 100644 index 7f65d679f7e8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java +++ /dev/null @@ -1,111 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload profile to scope container app execution. */ -@Fluent -public final class WorkloadProfile { - /* - * Workload profile type for the workloads to run on. - */ - @JsonProperty(value = "workloadProfileType", required = true) - private String workloadProfileType; - - /* - * The minimum capacity. - */ - @JsonProperty(value = "minimumCount", required = true) - private int minimumCount; - - /* - * The maximum capacity. - */ - @JsonProperty(value = "maximumCount", required = true) - private int maximumCount; - - /** Creates an instance of WorkloadProfile class. */ - public WorkloadProfile() { - } - - /** - * Get the workloadProfileType property: Workload profile type for the workloads to run on. - * - * @return the workloadProfileType value. - */ - public String workloadProfileType() { - return this.workloadProfileType; - } - - /** - * Set the workloadProfileType property: Workload profile type for the workloads to run on. - * - * @param workloadProfileType the workloadProfileType value to set. - * @return the WorkloadProfile object itself. - */ - public WorkloadProfile withWorkloadProfileType(String workloadProfileType) { - this.workloadProfileType = workloadProfileType; - return this; - } - - /** - * Get the minimumCount property: The minimum capacity. - * - * @return the minimumCount value. - */ - public int minimumCount() { - return this.minimumCount; - } - - /** - * Set the minimumCount property: The minimum capacity. - * - * @param minimumCount the minimumCount value to set. - * @return the WorkloadProfile object itself. - */ - public WorkloadProfile withMinimumCount(int minimumCount) { - this.minimumCount = minimumCount; - return this; - } - - /** - * Get the maximumCount property: The maximum capacity. - * - * @return the maximumCount value. - */ - public int maximumCount() { - return this.maximumCount; - } - - /** - * Set the maximumCount property: The maximum capacity. - * - * @param maximumCount the maximumCount value to set. - * @return the WorkloadProfile object itself. - */ - public WorkloadProfile withMaximumCount(int maximumCount) { - this.maximumCount = maximumCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (workloadProfileType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property workloadProfileType in model WorkloadProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkloadProfile.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java deleted file mode 100644 index a09c589800a9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java +++ /dev/null @@ -1,53 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; - -/** An immutable client-side representation of WorkloadProfileStates. */ -public interface WorkloadProfileStates { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Workload Profile resource specific properties. - * - * @return the properties value. - */ - WorkloadProfileStatesProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner object. - * - * @return the inner object. - */ - WorkloadProfileStatesInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java deleted file mode 100644 index b863517afddd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java +++ /dev/null @@ -1,78 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Collection of workloadProfileStates. */ -@Fluent -public final class WorkloadProfileStatesCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * Link to next page of resources. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadProfileStatesCollection class. */ - public WorkloadProfileStatesCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the WorkloadProfileStatesCollection object itself. - */ - public WorkloadProfileStatesCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model WorkloadProfileStatesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkloadProfileStatesCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java deleted file mode 100644 index f38519788088..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java +++ /dev/null @@ -1,102 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload Profile resource specific properties. */ -@Fluent -public final class WorkloadProfileStatesProperties { - /* - * Minimum count of instances. - */ - @JsonProperty(value = "minimumCount") - private Integer minimumCount; - - /* - * Maximum count of nodes. - */ - @JsonProperty(value = "maximumCount") - private Integer maximumCount; - - /* - * Current count of nodes. - */ - @JsonProperty(value = "currentCount") - private Integer currentCount; - - /** Creates an instance of WorkloadProfileStatesProperties class. */ - public WorkloadProfileStatesProperties() { - } - - /** - * Get the minimumCount property: Minimum count of instances. - * - * @return the minimumCount value. - */ - public Integer minimumCount() { - return this.minimumCount; - } - - /** - * Set the minimumCount property: Minimum count of instances. - * - * @param minimumCount the minimumCount value to set. - * @return the WorkloadProfileStatesProperties object itself. - */ - public WorkloadProfileStatesProperties withMinimumCount(Integer minimumCount) { - this.minimumCount = minimumCount; - return this; - } - - /** - * Get the maximumCount property: Maximum count of nodes. - * - * @return the maximumCount value. - */ - public Integer maximumCount() { - return this.maximumCount; - } - - /** - * Set the maximumCount property: Maximum count of nodes. - * - * @param maximumCount the maximumCount value to set. - * @return the WorkloadProfileStatesProperties object itself. - */ - public WorkloadProfileStatesProperties withMaximumCount(Integer maximumCount) { - this.maximumCount = maximumCount; - return this; - } - - /** - * Get the currentCount property: Current count of nodes. - * - * @return the currentCount value. - */ - public Integer currentCount() { - return this.currentCount; - } - - /** - * Set the currentCount property: Current count of nodes. - * - * @param currentCount the currentCount value to set. - * @return the WorkloadProfileStatesProperties object itself. - */ - public WorkloadProfileStatesProperties withCurrentCount(Integer currentCount) { - this.currentCount = currentCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java deleted file mode 100644 index 8fa357d7560c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java +++ /dev/null @@ -1,6 +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 ContainerAppsApiClient. null. */ -package com.azure.resourcemanager.appcontainers.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java deleted file mode 100644 index ed78d2648843..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java +++ /dev/null @@ -1,6 +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 classes for ContainerAppsApiClient. null. */ -package com.azure.resourcemanager.appcontainers; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java deleted file mode 100644 index 465278559546..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.appcontainers { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.appcontainers; - exports com.azure.resourcemanager.appcontainers.fluent; - exports com.azure.resourcemanager.appcontainers.fluent.models; - exports com.azure.resourcemanager.appcontainers.models; - - opens com.azure.resourcemanager.appcontainers.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.appcontainers.models to - com.azure.core, - com.fasterxml.jackson.databind; -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java deleted file mode 100644 index cb3b124a6d1d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for AvailableWorkloadProfiles Get. */ -public final class AvailableWorkloadProfilesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ - /** - * Sample code: BillingMeters_Get. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.availableWorkloadProfiles().get("East US", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java deleted file mode 100644 index 5a61c09fc519..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for BillingMeters Get. */ -public final class BillingMetersGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json - */ - /** - * Sample code: BillingMeters_Get. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.billingMeters().getWithResponse("East US", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java deleted file mode 100644 index 01c68c8b82cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; - -/** Samples for Certificates CreateOrUpdate. */ -public final class CertificatesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java deleted file mode 100644 index ba5d9fdaca29..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for Certificates Delete. */ -public final class CertificatesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json - */ - /** - * Sample code: Delete Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java deleted file mode 100644 index 8c03998b60ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for Certificates Get. */ -public final class CertificatesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json - */ - /** - * Sample code: Get Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java deleted file mode 100644 index 78d2e8e1bdbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for Certificates List. */ -public final class CertificatesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json - */ - /** - * Sample code: List Certificates by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listCertificatesByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java deleted file mode 100644 index db66bc2a7f9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Certificates Update. */ -public final class CertificatesUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json - */ - /** - * Sample code: Patch Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java deleted file mode 100644 index 0b2dd0645194..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; - -/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ -public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .createOrUpdateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificateInner() - .withLocation("East US") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())), - Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java deleted file mode 100644 index 21e25b3fd21c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsCertificates Delete. */ -public final class ConnectedEnvironmentsCertificatesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ - /** - * Sample code: Delete Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java deleted file mode 100644 index 7516a6391ae8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsCertificates Get. */ -public final class ConnectedEnvironmentsCertificatesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ - /** - * Sample code: Get Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java deleted file mode 100644 index 5b8c0e11d2f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsCertificates List. */ -public final class ConnectedEnvironmentsCertificatesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ - /** - * Sample code: List Certificates by Connected Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listCertificatesByConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java deleted file mode 100644 index c2ea3462e495..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ConnectedEnvironmentsCertificates Update. */ -public final class ConnectedEnvironmentsCertificatesUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ - /** - * Sample code: Patch Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .updateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java deleted file mode 100644 index eb7a2b950c5b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** Samples for ConnectedEnvironments CheckNameAvailability. */ -public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ - /** - * Sample code: Certificates_CheckNameAvailability. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/connectedEnvironments/certificates"), - Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java deleted file mode 100644 index 522f5ec60a7e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; - -/** Samples for ConnectedEnvironments CreateOrUpdate. */ -public final class ConnectedEnvironmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ - /** - * Sample code: Create kube environments. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .define("testenv") - .withRegion("East US") - .withExistingResourceGroup("examplerg") - .withStaticIp("1.2.3.4") - .withDaprAIConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java deleted file mode 100644 index cd3fa3e3ef56..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,47 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; - -/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ -public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ - /** - * Sample code: Create or update dapr component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java deleted file mode 100644 index a69345b86f61..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ -public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ - /** - * Sample code: Delete dapr component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java deleted file mode 100644 index d390a2855c97..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsDaprComponents Get. */ -public final class ConnectedEnvironmentsDaprComponentsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ - /** - * Sample code: Get Dapr Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java deleted file mode 100644 index 128602c62d89..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsDaprComponents List. */ -public final class ConnectedEnvironmentsDaprComponentsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ - /** - * Sample code: List Dapr Components. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java deleted file mode 100644 index a61beb852670..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ -public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ - /** - * Sample code: List Container Apps Secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java deleted file mode 100644 index e9217065c241..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironments Delete. */ -public final class ConnectedEnvironmentsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ - /** - * Sample code: Delete connected environment by connectedEnvironmentName. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().delete("examplerg", "examplekenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java deleted file mode 100644 index a7d39482efc5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironments GetByResourceGroup. */ -public final class ConnectedEnvironmentsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json - */ - /** - * Sample code: Get connected environment by connectedEnvironmentName. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java deleted file mode 100644 index 82cc091edcaa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironments ListByResourceGroup. */ -public final class ConnectedEnvironmentsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json - */ - /** - * Sample code: List environments by resource group. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().listByResourceGroup("examplerg", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java deleted file mode 100644 index 30f3f82abc13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironments List. */ -public final class ConnectedEnvironmentsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ - /** - * Sample code: List connected environments by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listConnectedEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().list(Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java deleted file mode 100644 index 48dd759809e9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AccessMode; -import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; - -/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ -public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ - /** - * Sample code: Create or update environments storage. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateEnvironmentsStorage( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .define("jlaw-demo1") - .withExistingConnectedEnvironment("examplerg", "env") - .withProperties( - new ConnectedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("key") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java deleted file mode 100644 index 3d32e15e66d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsStorages Delete. */ -public final class ConnectedEnvironmentsStoragesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java deleted file mode 100644 index 985b69a863c2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsStorages Get. */ -public final class ConnectedEnvironmentsStoragesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ - /** - * Sample code: get a environments storage properties by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAEnvironmentsStoragePropertiesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java deleted file mode 100644 index 7bc9c5c70084..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironmentsStorages List. */ -public final class ConnectedEnvironmentsStoragesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java deleted file mode 100644 index 0ab238827263..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ConnectedEnvironments Update. */ -public final class ConnectedEnvironmentsUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ - /** - * Sample code: Patch Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java deleted file mode 100644 index 2af3fe3a1f3d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; - -/** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ -public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Container App AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withPlatform(new AuthPlatform().withEnabled(true)) - .withGlobalValidation( - new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) - .withIdentityProviders( - new IdentityProviders() - .withFacebook( - new Facebook() - .withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("facebook-secret")))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java deleted file mode 100644 index 02b1f78b7217..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsAuthConfigs Delete. */ -public final class ContainerAppsAuthConfigsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json - */ - /** - * Sample code: Delete Container App AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java deleted file mode 100644 index eba01b17982f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsAuthConfigs Get. */ -public final class ContainerAppsAuthConfigsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json - */ - /** - * Sample code: Get Container App's AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java deleted file mode 100644 index 5151311e9b5e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ -public final class ContainerAppsAuthConfigsListByContainerAppSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json - */ - /** - * Sample code: List Auth Configs by Container Apps. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listAuthConfigsByContainerApps( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java deleted file mode 100644 index e60fa035af7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ /dev/null @@ -1,227 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ContainerApps CreateOrUpdate. */ -public final class ContainerAppsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateContainerApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileType("GeneralPurpose") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) - .withTemplate( - new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Tcp App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerAppTcp") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerAppTcp-ab1234") - .withWeight(100))))) - .withTemplate( - new Template() - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppTcp:v1") - .withName("testcontainerAppTcp") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("tcpscalingrule") - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("concurrentConnections", "50"))))))) - .create(); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java deleted file mode 100644 index 8add349fae66..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps Delete. */ -public final class ContainerAppsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json - */ - /** - * Sample code: Delete Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().delete("rg", "testWorkerApp0", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java deleted file mode 100644 index 33994d2b505a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsDiagnostics GetDetector. */ -public final class ContainerAppsDiagnosticsGetDetectorSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ - /** - * Sample code: Get Container App's diagnostics info. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSDiagnosticsInfo( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java deleted file mode 100644 index e5c4a8156457..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsDiagnostics GetRevision. */ -public final class ContainerAppsDiagnosticsGetRevisionSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ - /** - * Sample code: Get Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java deleted file mode 100644 index e0c052a830ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsDiagnostics GetRoot. */ -public final class ContainerAppsDiagnosticsGetRootSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ - /** - * Sample code: Get Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java deleted file mode 100644 index 94801afae727..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsDiagnostics ListDetectors. */ -public final class ContainerAppsDiagnosticsListDetectorsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ - /** - * Sample code: Get the list of available diagnostics for a given Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java deleted file mode 100644 index fecef91f927a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsDiagnostics ListRevisions. */ -public final class ContainerAppsDiagnosticsListRevisionsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ - /** - * Sample code: List Container App's revisions. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppSRevisions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java deleted file mode 100644 index d12d281193dc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps GetAuthToken. */ -public final class ContainerAppsGetAuthTokenSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ - /** - * Sample code: Get Container App Auth Token. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java deleted file mode 100644 index cd34f1b253fa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps GetByResourceGroup. */ -public final class ContainerAppsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json - */ - /** - * Sample code: Get Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java deleted file mode 100644 index 5d328c5b2fb4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps ListByResourceGroup. */ -public final class ContainerAppsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json - */ - /** - * Sample code: List Container Apps by resource group. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listByResourceGroup("rg", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java deleted file mode 100644 index 9a017f67da97..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps ListCustomHostnameAnalysis. */ -public final class ContainerAppsListCustomHostnameAnalysisSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ - /** - * Sample code: Analyze Custom Hostname. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java deleted file mode 100644 index d88568039981..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps List. */ -public final class ContainerAppsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json - */ - /** - * Sample code: List Container Apps by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().list(Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java deleted file mode 100644 index 9a17fe1e8d4a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerApps ListSecrets. */ -public final class ContainerAppsListSecretsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json - */ - /** - * Sample code: List Container Apps Secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java deleted file mode 100644 index f61fd0c8c7ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisionReplicas GetReplica. */ -public final class ContainerAppsRevisionReplicasGetReplicaSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json - */ - /** - * Sample code: Get Container App's revision replica. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSRevisionReplica( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .getReplicaWithResponse( - "workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java deleted file mode 100644 index d8dd9e3f9dd6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisionReplicas ListReplicas. */ -public final class ContainerAppsRevisionReplicasListReplicasSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json - */ - /** - * Sample code: List Container App's replicas. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppSReplicas( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java deleted file mode 100644 index c874ecf8f9db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisions ActivateRevision. */ -public final class ContainerAppsRevisionsActivateRevisionSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json - */ - /** - * Sample code: Activate Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void activateContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java deleted file mode 100644 index a50104cc5545..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisions DeactivateRevision. */ -public final class ContainerAppsRevisionsDeactivateRevisionSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json - */ - /** - * Sample code: Deactivate Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deactivateContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java deleted file mode 100644 index 40770dc22e01..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisions GetRevision. */ -public final class ContainerAppsRevisionsGetRevisionSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json - */ - /** - * Sample code: Get Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java deleted file mode 100644 index 8b6e6137e0a5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisions ListRevisions. */ -public final class ContainerAppsRevisionsListRevisionsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json - */ - /** - * Sample code: List Container App's revisions. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppSRevisions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java deleted file mode 100644 index 75ec2cca6581..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsRevisions RestartRevision. */ -public final class ContainerAppsRevisionsRestartRevisionSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json - */ - /** - * Sample code: Restart Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void restartContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java deleted file mode 100644 index b22cf60e9378..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AzureCredentials; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.RegistryInfo; - -/** Samples for ContainerAppsSourceControls CreateOrUpdate. */ -public final class ContainerAppsSourceControlsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Container App SourceControl. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest") - .withBranch("master") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withRegistryInfo( - new RegistryInfo() - .withRegistryUrl("xwang971reg.azurecr.io") - .withRegistryUsername("xwang971reg") - .withRegistryPassword("")) - .withAzureCredentials( - new AzureCredentials() - .withClientId("") - .withClientSecret("") - .withTenantId("")) - .withContextPath("./") - .withImage("image/tag")) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java deleted file mode 100644 index 243a89a2b538..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsSourceControls Delete. */ -public final class ContainerAppsSourceControlsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json - */ - /** - * Sample code: Delete Container App SourceControl. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java deleted file mode 100644 index c8e88ef5d8b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsSourceControls Get. */ -public final class ContainerAppsSourceControlsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json - */ - /** - * Sample code: Get Container App's SourceControl. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerAppSSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java deleted file mode 100644 index ed84c27a47b4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ContainerAppsSourceControls ListByContainerApp. */ -public final class ContainerAppsSourceControlsListByContainerAppSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json - */ - /** - * Sample code: List App's Source Controls. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java deleted file mode 100644 index 7c693a2a1f80..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java +++ /dev/null @@ -1,164 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ContainerApps Update. */ -public final class ContainerAppsUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json - */ - /** - * Sample code: Patch Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .update( - "rg", - "testcontainerApp0", - new ContainerAppInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) - .withTemplate( - new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))), - Context.NONE); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java deleted file mode 100644 index ca9c24c4c77b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,72 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; - -/** Samples for DaprComponents CreateOrUpdate. */ -public final class DaprComponentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ - /** - * Sample code: Create or update dapr component with secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentWithSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ - /** - * Sample code: Create or update dapr component with secret store component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("my-secret-store") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java deleted file mode 100644 index b7da35a6649a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for DaprComponents Delete. */ -public final class DaprComponentsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json - */ - /** - * Sample code: Delete dapr component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java deleted file mode 100644 index 43f1c579ea9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for DaprComponents Get. */ -public final class DaprComponentsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ - /** - * Sample code: Get Dapr Component with secret store component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ - /** - * Sample code: Get Dapr Component with secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprComponentWithSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java deleted file mode 100644 index 722a171a9c77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for DaprComponents List. */ -public final class DaprComponentsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json - */ - /** - * Sample code: List Dapr Components. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().list("examplerg", "myenvironment", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java deleted file mode 100644 index f301616014ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for DaprComponents ListSecrets. */ -public final class DaprComponentsListSecretsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json - */ - /** - * Sample code: List Container Apps Secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java deleted file mode 100644 index 8f468b00f2e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ -public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ - /** - * Sample code: Get diagnostic data for a managed environments. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDiagnosticDataForAManagedEnvironments( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java deleted file mode 100644 index a85c61336f73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ -public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ - /** - * Sample code: Get the list of available diagnostic data for a managed environments. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java deleted file mode 100644 index 750e5d106db9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,70 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import com.azure.resourcemanager.appcontainers.models.SkuName; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import java.util.Arrays; - -/** Samples for ManagedEnvironments CreateOrUpdate. */ -public final class ManagedEnvironmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json - */ - /** - * Sample code: Create environments. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .define("testcontainerenv") - .withRegion("East US") - .withExistingResourceGroup("examplerg") - .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) - .withDaprAIConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withVnetConfiguration( - new VnetConfiguration() - .withOutboundSettings( - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) - .withVirtualNetworkApplianceIp("192.168.1.20"))) - .withAppLogsConfiguration( - new AppLogsConfiguration() - .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) - .withZoneRedundant(true) - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) - .withWorkloadProfiles( - Arrays - .asList( - new WorkloadProfile() - .withWorkloadProfileType("GeneralPurpose") - .withMinimumCount(3) - .withMaximumCount(12), - new WorkloadProfile() - .withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile() - .withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3) - .withMaximumCount(6))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java deleted file mode 100644 index 4166699a9962..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments Delete. */ -public final class ManagedEnvironmentsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json - */ - /** - * Sample code: Delete environment by name. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteEnvironmentByName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().delete("examplerg", "examplekenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java deleted file mode 100644 index efb4da6fedf3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ -public final class ManagedEnvironmentsDiagnosticsGetRootSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ - /** - * Sample code: Get environments by name. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java deleted file mode 100644 index bdf62a7cc8a2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments GetAuthToken. */ -public final class ManagedEnvironmentsGetAuthTokenSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ - /** - * Sample code: Get Managed Environment Auth Token. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getManagedEnvironmentAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java deleted file mode 100644 index de387050cbce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments GetByResourceGroup. */ -public final class ManagedEnvironmentsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json - */ - /** - * Sample code: Get environments by name. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java deleted file mode 100644 index 56733c8475f4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments ListByResourceGroup. */ -public final class ManagedEnvironmentsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json - */ - /** - * Sample code: List environments by resource group. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listByResourceGroup("examplerg", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java deleted file mode 100644 index fb5a7e7e2aaf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments List. */ -public final class ManagedEnvironmentsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json - */ - /** - * Sample code: List environments by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().list(Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java deleted file mode 100644 index 5ae4808ba630..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironments ListWorkloadProfileStates. */ -public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ - /** - * Sample code: List environments by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java deleted file mode 100644 index 3bef9aeafacd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AccessMode; -import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; - -/** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ -public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ - /** - * Sample code: Create or update environments storage. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateEnvironmentsStorage( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .define("jlaw-demo1") - .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties( - new ManagedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("key") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java deleted file mode 100644 index 042571857672..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentsStorages Delete. */ -public final class ManagedEnvironmentsStoragesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java deleted file mode 100644 index 923f94843e83..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentsStorages Get. */ -public final class ManagedEnvironmentsStoragesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json - */ - /** - * Sample code: get a environments storage properties by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAEnvironmentsStoragePropertiesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java deleted file mode 100644 index 10f08f791fee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for ManagedEnvironmentsStorages List. */ -public final class ManagedEnvironmentsStoragesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java deleted file mode 100644 index 99932fc462a6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ManagedEnvironments Update. */ -public final class ManagedEnvironmentsUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json - */ - /** - * Sample code: Patch Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .update( - "examplerg", - "testcontainerenv", - new ManagedEnvironmentInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java deleted file mode 100644 index 9fe9d81cd386..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,51 +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.appcontainers.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** Samples for Namespaces CheckNameAvailability. */ -public final class NamespacesCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json - */ - /** - * Sample code: Certificates_CheckNameAvailability. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/managedEnvironments/certificates"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json - */ - /** - * Sample code: ContainerApps_CheckNameAvailability. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void containerAppsCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java deleted file mode 100644 index 41eb1cd667b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json - */ - /** - * Sample code: List all operations. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.operations().list(Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 00234c42c406..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedAudiencesValidationTests { - @Test - public void testDeserialize() { - AllowedAudiencesValidation model = - BinaryData.fromString("{\"allowedAudiences\":[\"m\"]}").toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", model.allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - AllowedAudiencesValidation model = new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("m")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java deleted file mode 100644 index b9de692babcf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedPrincipalsTests { - @Test - public void testDeserialize() { - AllowedPrincipals model = - BinaryData - .fromString("{\"groups\":[\"urzafb\",\"jjgpb\",\"oq\"],\"identities\":[\"klj\",\"vbqid\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } - - @Test - public void testSerialize() { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("urzafb", "jjgpb", "oq")) - .withIdentities(Arrays.asList("klj", "vbqid")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java deleted file mode 100644 index c1f989a0beee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppRegistrationTests { - @Test - public void testDeserialize() { - AppRegistration model = - BinaryData - .fromString("{\"appId\":\"l\",\"appSecretSettingName\":\"majtjaod\"}") - .toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } - - @Test - public void testSerialize() { - AppRegistration model = new AppRegistration().withAppId("l").withAppSecretSettingName("majtjaod"); - model = BinaryData.fromObject(model).toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java deleted file mode 100644 index 02090f7ea3d5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleRegistrationTests { - @Test - public void testDeserialize() { - AppleRegistration model = - BinaryData - .fromString("{\"clientId\":\"oqfbowskanyk\",\"clientSecretSettingName\":\"lcuiywgqywgndr\"}") - .toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - AppleRegistration model = - new AppleRegistration().withClientId("oqfbowskanyk").withClientSecretSettingName("lcuiywgqywgndr"); - model = BinaryData.fromObject(model).toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java deleted file mode 100644 index dcba9e0131e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleTests { - @Test - public void testDeserialize() { - Apple model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"gnxkrxdqmidtth\",\"clientSecretSettingName\":\"vqdra\"},\"login\":{\"scopes\":[\"big\"]}}") - .toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Apple model = - new Apple() - .withEnabled(true) - .withRegistration( - new AppleRegistration().withClientId("gnxkrxdqmidtth").withClientSecretSettingName("vqdra")) - .withLogin(new LoginScopes().withScopes(Arrays.asList("big"))); - model = BinaryData.fromObject(model).toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index 82fd1a024a19..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class AuthConfigCollectionTests { - @Test - public void testDeserialize() { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"xpyb\",\"name\":\"zm\",\"type\":\"hmtzopbsphrup\"},{\"properties\":{},\"id\":\"jhphoyc\",\"name\":\"sx\",\"type\":\"obhdxbmtqioqjze\"},{\"properties\":{},\"id\":\"wnoi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}],\"nextLink\":\"mbpazlobcufpdzn\"}") - .toObject(AuthConfigCollection.class); - } - - @Test - public void testSerialize() { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue(Arrays.asList(new AuthConfigInner(), new AuthConfigInner(), new AuthConfigInner())); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java deleted file mode 100644 index 3f179d491cd6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java +++ /dev/null @@ -1,80 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigInnerTests { - @Test - public void testDeserialize() { - AuthConfigInner model = - BinaryData - .fromString( - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"jnqglhqgnu\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"ywifsqesaag\",\"excludedPaths\":[\"glzlhjxrifkwmrv\",\"tsizntocipaoua\"]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"nygj\",\"fjddeqs\",\"deupewnwrei\"]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"rh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"}") - .toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @Test - public void testSerialize() { - AuthConfigInner model = - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("jnqglhqgnu")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("ywifsqesaag") - .withExcludedPaths(Arrays.asList("glzlhjxrifkwmrv", "tsizntocipaoua"))) - .withIdentityProviders(new IdentityProviders().withCustomOpenIdConnectProviders(mapOf())) - .withLogin( - new Login() - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("nygj", "fjddeqs", "deupewnwrei"))) - .withHttpSettings(new HttpSettings().withRequireHttps(false)); - model = BinaryData.fromObject(model).toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java deleted file mode 100644 index 9417352161d2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java +++ /dev/null @@ -1,158 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigProperties; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigPropertiesTests { - @Test - public void testDeserialize() { - AuthConfigProperties model = - BinaryData - .fromString( - "{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"graphApiVersion\":\"cbjy\"},\"gitHub\":{\"enabled\":false},\"google\":{\"enabled\":true},\"twitter\":{\"enabled\":true},\"apple\":{\"enabled\":false},\"azureStaticWebApps\":{\"enabled\":false},\"customOpenIdConnectProviders\":{\"y\":{\"enabled\":false}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"b\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"vd\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"tfwvukxgaudc\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"jcny\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"htnapczwlokjyem\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"pjoxzjnch\",\"customProtoHeaderName\":\"jspodmailzyde\"}}}") - .toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - AuthConfigProperties model = - new AuthConfigProperties() - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("sjtxukcdmp")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("uanzwuxzdx") - .withExcludedPaths(Arrays.asList("rlhm", "hfpmrqobmtukknr", "rtihfxtijbpz", "gnwzsymglzufc"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory().withEnabled(false).withIsAutoProvisioned(true)) - .withFacebook(new Facebook().withEnabled(false).withGraphApiVersion("cbjy")) - .withGitHub(new GitHub().withEnabled(false)) - .withGoogle(new Google().withEnabled(true)) - .withTwitter(new Twitter().withEnabled(true)) - .withApple(new Apple().withEnabled(false)) - .withAzureStaticWebApps(new AzureStaticWebApps().withEnabled(false)) - .withCustomOpenIdConnectProviders( - mapOf("y", new CustomOpenIdConnectProvider().withEnabled(false)))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("b")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("vd")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("tfwvukxgaudc")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("jcny"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("htnapczwlokjyem")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("pjoxzjnch") - .withCustomProtoHeaderName("jspodmailzyde"))); - model = BinaryData.fromObject(model).toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 9ce13d083e26..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthPlatformTests { - @Test - public void testDeserialize() { - AuthPlatform model = - BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"yahux\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } - - @Test - public void testSerialize() { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("yahux"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java deleted file mode 100644 index 41758c752853..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,91 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableOperationsTests { - @Test - public void testDeserialize() { - AvailableOperations model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"kambtrnegvmnvuqe\",\"isDataAction\":false,\"display\":{\"provider\":\"pa\",\"resource\":\"jbkkdmflvestmjl\",\"operation\":\"ril\",\"description\":\"apeewchpxlkt\"},\"origin\":\"uziycsl\"},{\"name\":\"ufuztcktyhjtq\",\"isDataAction\":true,\"display\":{\"provider\":\"ulwm\",\"resource\":\"qzz\",\"operation\":\"jvpglydzgk\",\"description\":\"qeevt\"},\"origin\":\"pryu\"},{\"name\":\"wytpzdmovz\",\"isDataAction\":false,\"display\":{\"provider\":\"wzqa\",\"resource\":\"lgzurig\",\"operation\":\"ecxn\",\"description\":\"icokpv\"},\"origin\":\"lqtmldgxob\"},{\"name\":\"rclnpkc\",\"isDataAction\":false,\"display\":{\"provider\":\"iykhy\",\"resource\":\"fvjlboxqvkjlmx\",\"operation\":\"mdy\",\"description\":\"dwdigumb\"},\"origin\":\"aauzzptjazysd\"}],\"nextLink\":\"ezwwv\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", model.nextLink()); - } - - @Test - public void testSerialize() { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("kambtrnegvmnvuqe") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("pa") - .withResource("jbkkdmflvestmjl") - .withOperation("ril") - .withDescription("apeewchpxlkt")) - .withOrigin("uziycsl"), - new OperationDetailInner() - .withName("ufuztcktyhjtq") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("ulwm") - .withResource("qzz") - .withOperation("jvpglydzgk") - .withDescription("qeevt")) - .withOrigin("pryu"), - new OperationDetailInner() - .withName("wytpzdmovz") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("wzqa") - .withResource("lgzurig") - .withOperation("ecxn") - .withDescription("icokpv")) - .withOrigin("lqtmldgxob"), - new OperationDetailInner() - .withName("rclnpkc") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("iykhy") - .withResource("fvjlboxqvkjlmx") - .withOperation("mdy") - .withDescription("dwdigumb")) - .withOrigin("aauzzptjazysd"))) - .withNextLink("ezwwv"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java deleted file mode 100644 index 6da5265f9513..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java +++ /dev/null @@ -1,51 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfileInnerTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileInner model = - BinaryData - .fromString( - "{\"location\":\"ruzslzoj\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuMemoryOptimized\",\"applicability\":\"Custom\",\"cores\":1500212037,\"memoryGiB\":1889500647,\"displayName\":\"ngfdgugeyzihgrky\"},\"id\":\"zabs\",\"name\":\"mfp\",\"type\":\"hojeevy\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", model.properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("ruzslzoj") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withApplicability(Applicability.CUSTOM) - .withCores(1500212037) - .withMemoryGiB(1889500647) - .withDisplayName("ngfdgugeyzihgrky")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java deleted file mode 100644 index 1d1c287b08cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilePropertiesTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileProperties model = - BinaryData - .fromString( - "{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"LocationDefault\",\"cores\":1792442027,\"memoryGiB\":296401749,\"displayName\":\"gomfgbeglq\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", model.displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1792442027) - .withMemoryGiB(296401749) - .withDisplayName("gomfgbeglq"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java deleted file mode 100644 index da7e816f2cf1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,70 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilesCollectionTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfilesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"psttexoq\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":402556977,\"memoryGiB\":130119392,\"displayName\":\"uncuw\"},\"id\":\"spkcdqzh\",\"name\":\"ctddun\",\"type\":\"ndy\"},{\"location\":\"chrqb\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":1318617256,\"memoryGiB\":4442645,\"displayName\":\"wboxjumvqqo\"},\"id\":\"hrraiouaubrj\",\"name\":\"loqxfuojrngif\",\"type\":\"rzpasccbiuimzdly\"}],\"nextLink\":\"fqwmkyoquf\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfilesCollection model = - new AvailableWorkloadProfilesCollection() - .withValue( - Arrays - .asList( - new AvailableWorkloadProfileInner() - .withLocation("psttexoq") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(402556977) - .withMemoryGiB(130119392) - .withDisplayName("uncuw")), - new AvailableWorkloadProfileInner() - .withLocation("chrqb") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(1318617256) - .withMemoryGiB(4442645) - .withDisplayName("wboxjumvqqo")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java deleted file mode 100644 index 052ac47bc556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,79 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"idmhmwf\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuComputeOptimized\",\"applicability\":\"LocationDefault\",\"cores\":411481219,\"memoryGiB\":323271862,\"displayName\":\"ccrrvweyoxoyyu\"},\"id\":\"haim\",\"name\":\"oir\",\"type\":\"qboshbra\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.availableWorkloadProfiles().get("wwgbdv", Context.NONE); - - Assertions.assertEquals("idmhmwf", response.iterator().next().location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, response.iterator().next().properties().billingMeterCategory()); - Assertions - .assertEquals(Applicability.LOCATION_DEFAULT, response.iterator().next().properties().applicability()); - Assertions.assertEquals(411481219, response.iterator().next().properties().cores()); - Assertions.assertEquals(323271862, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("ccrrvweyoxoyyu", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java deleted file mode 100644 index e0b3f0df7873..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryLoginTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryLogin model = - BinaryData - .fromString("{\"loginParameters\":[\"eju\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryLogin model = - new AzureActiveDirectoryLogin().withLoginParameters(Arrays.asList("eju")).withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java deleted file mode 100644 index 59a59d6c4bc4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryRegistrationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryRegistration model = - BinaryData - .fromString( - "{\"openIdIssuer\":\"ddgmb\",\"clientId\":\"ex\",\"clientSecretSettingName\":\"bhtqqrolfpfpsa\",\"clientSecretCertificateThumbprint\":\"bquxigjy\",\"clientSecretCertificateSubjectAlternativeName\":\"zjaoyfhrtxil\",\"clientSecretCertificateIssuer\":\"rkujy\"}") - .toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryRegistration model = - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("ddgmb") - .withClientId("ex") - .withClientSecretSettingName("bhtqqrolfpfpsa") - .withClientSecretCertificateThumbprint("bquxigjy") - .withClientSecretCertificateSubjectAlternativeName("zjaoyfhrtxil") - .withClientSecretCertificateIssuer("rkujy"); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java deleted file mode 100644 index 0b1d3c18501e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java +++ /dev/null @@ -1,87 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryTests { - @Test - public void testDeserialize() { - AzureActiveDirectory model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"openIdIssuer\":\"pdappds\",\"clientId\":\"kvwrwjfeu\",\"clientSecretSettingName\":\"hutje\",\"clientSecretCertificateThumbprint\":\"mrldhu\",\"clientSecretCertificateSubjectAlternativeName\":\"zzd\",\"clientSecretCertificateIssuer\":\"qxhocdgeablgphut\"},\"login\":{\"loginParameters\":[\"vkaozwyiftyhxhur\",\"k\"],\"disableWWWAuthenticate\":false},\"validation\":{\"jwtClaimChecks\":{\"allowedGroups\":[\"iwpwcuk\",\"fkgiawxk\",\"ryplwckbasyypn\"],\"allowedClientApplications\":[\"sgcbac\",\"hejkotynqgou\",\"zndlikwy\",\"kgfg\"]},\"allowedAudiences\":[\"adgakeqsrxybz\",\"qedqytbciqfoufl\",\"mnkzsmod\",\"glougpbk\"],\"defaultAuthorizationPolicy\":{\"allowedApplications\":[\"duqkt\",\"pspwgcuertu\",\"kdosvqw\",\"bmdg\"]}},\"isAutoProvisioned\":true}") - .toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } - - @Test - public void testSerialize() { - AzureActiveDirectory model = - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration( - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("pdappds") - .withClientId("kvwrwjfeu") - .withClientSecretSettingName("hutje") - .withClientSecretCertificateThumbprint("mrldhu") - .withClientSecretCertificateSubjectAlternativeName("zzd") - .withClientSecretCertificateIssuer("qxhocdgeablgphut")) - .withLogin( - new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("vkaozwyiftyhxhur", "k")) - .withDisableWwwAuthenticate(false)) - .withValidation( - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("iwpwcuk", "fkgiawxk", "ryplwckbasyypn")) - .withAllowedClientApplications( - Arrays.asList("sgcbac", "hejkotynqgou", "zndlikwy", "kgfg"))) - .withAllowedAudiences(Arrays.asList("adgakeqsrxybz", "qedqytbciqfoufl", "mnkzsmod", "glougpbk")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedApplications(Arrays.asList("duqkt", "pspwgcuertu", "kdosvqw", "bmdg")))) - .withIsAutoProvisioned(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java deleted file mode 100644 index 92d5eb1aa61a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java +++ /dev/null @@ -1,59 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryValidationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryValidation model = - BinaryData - .fromString( - "{\"jwtClaimChecks\":{\"allowedGroups\":[\"lyxwjkcprbnwbx\",\"jvtbvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"],\"allowedClientApplications\":[\"zga\",\"x\"]},\"allowedAudiences\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"],\"defaultAuthorizationPolicy\":{\"allowedPrincipals\":{\"groups\":[\"nteiwaopv\",\"mijcmmxdcufufs\"],\"identities\":[\"mzidnsezcxtb\",\"sgfyccsnew\"]},\"allowedApplications\":[\"z\",\"eiachboosflnr\"]}}") - .toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryValidation model = - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups( - Arrays.asList("lyxwjkcprbnwbx", "jvtbvpyss", "dnrujqguhmuouqfp", "wzwbnguitn")) - .withAllowedClientApplications(Arrays.asList("zga", "x"))) - .withAllowedAudiences(Arrays.asList("zuckyfi", "rfidfvzwdz", "htymw", "sdkf")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nteiwaopv", "mijcmmxdcufufs")) - .withIdentities(Arrays.asList("mzidnsezcxtb", "sgfyccsnew"))) - .withAllowedApplications(Arrays.asList("z", "eiachboosflnr"))); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index 900228f67613..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsRegistrationTests { - @Test - public void testDeserialize() { - AzureStaticWebAppsRegistration model = - BinaryData.fromString("{\"clientId\":\"cpecfvmmcoofs\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", model.clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("cpecfvmmcoofs"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", model.clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java deleted file mode 100644 index 3924480b2732..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsTests { - @Test - public void testDeserialize() { - AzureStaticWebApps model = - BinaryData - .fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"gpphrcgyn\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("gpphrcgyn")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java deleted file mode 100644 index ca32730bb673..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java +++ /dev/null @@ -1,73 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BaseContainer; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BaseContainerTests { - @Test - public void testDeserialize() { - BaseContainer model = - BinaryData - .fromString( - "{\"image\":\"wmgxcxrsl\",\"name\":\"utwu\",\"command\":[\"rpkhjwn\",\"yqsluic\",\"dggkzzlvmbmpa\"],\"args\":[\"dfvue\",\"yw\",\"bpfvm\"],\"env\":[{\"name\":\"fouyf\",\"value\":\"akcp\",\"secretRef\":\"yzvqt\"},{\"name\":\"ubex\",\"value\":\"zksmondj\",\"secretRef\":\"uxvypomgkopkwh\"}],\"resources\":{\"cpu\":52.49920535887086,\"memory\":\"qgxy\",\"ephemeralStorage\":\"ocmbqfqvmkcxoza\"},\"volumeMounts\":[{\"volumeName\":\"lxprglyatddckcbc\",\"mountPath\":\"jrjxgciqibrhosx\"},{\"volumeName\":\"qrhzoymibmrqyib\",\"mountPath\":\"wfluszdt\"},{\"volumeName\":\"rkwofyyvoqa\",\"mountPath\":\"iexpbtgiwbwo\"}]}") - .toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - BaseContainer model = - new BaseContainer() - .withImage("wmgxcxrsl") - .withName("utwu") - .withCommand(Arrays.asList("rpkhjwn", "yqsluic", "dggkzzlvmbmpa")) - .withArgs(Arrays.asList("dfvue", "yw", "bpfvm")) - .withEnv( - Arrays - .asList( - new EnvironmentVar().withName("fouyf").withValue("akcp").withSecretRef("yzvqt"), - new EnvironmentVar() - .withName("ubex") - .withValue("zksmondj") - .withSecretRef("uxvypomgkopkwh"))) - .withResources(new ContainerResources().withCpu(52.49920535887086D).withMemory("qgxy")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("lxprglyatddckcbc").withMountPath("jrjxgciqibrhosx"), - new VolumeMount().withVolumeName("qrhzoymibmrqyib").withMountPath("wfluszdt"), - new VolumeMount().withVolumeName("rkwofyyvoqa").withMountPath("iexpbtgiwbwo"))); - model = BinaryData.fromObject(model).toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index e7bd249fa4fc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java +++ /dev/null @@ -1,71 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterCollectionInnerTests { - @Test - public void testDeserialize() { - BillingMeterCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"o\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"nlu\",\"displayName\":\"krrfx\"},\"id\":\"ebtijvacvbmqzbqq\",\"name\":\"lajrnwxacevehj\",\"type\":\"uyxoaf\"},{\"location\":\"oqltfae\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"fgvxirpghriypoqe\",\"displayName\":\"lqhykprlpyz\"},\"id\":\"ciqdsme\",\"name\":\"iitdfuxt\",\"type\":\"asiibmiybnnust\"},{\"location\":\"ljhnmgixhcmav\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"dorhcgyyp\",\"displayName\":\"twypundmbxh\"},\"id\":\"cmjkavlgorbmftpm\",\"name\":\"tzfjltf\",\"type\":\"nzcyjtotp\"},{\"location\":\"pvpbdbzqgqqiheds\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"mkyi\",\"displayName\":\"ysi\"},\"id\":\"gqcwdhohsdtmc\",\"name\":\"zsu\",\"type\":\"cohdx\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeterCollectionInner model = - new BillingMeterCollectionInner() - .withValue( - Arrays - .asList( - new BillingMeter() - .withLocation("o") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("nlu") - .withDisplayName("krrfx")), - new BillingMeter() - .withLocation("oqltfae") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("fgvxirpghriypoqe") - .withDisplayName("lqhykprlpyz")), - new BillingMeter() - .withLocation("ljhnmgixhcmav") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("dorhcgyyp") - .withDisplayName("twypundmbxh")), - new BillingMeter() - .withLocation("pvpbdbzqgqqiheds") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("mkyi") - .withDisplayName("ysi")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java deleted file mode 100644 index 1e151c8e438a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterPropertiesTests { - @Test - public void testDeserialize() { - BillingMeterProperties model = - BinaryData - .fromString( - "{\"category\":\"PremiumSkuGeneralPurpose\",\"meterType\":\"eqocljmygvk\",\"displayName\":\"kjjeokbz\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", model.displayName()); - } - - @Test - public void testSerialize() { - BillingMeterProperties model = - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withMeterType("eqocljmygvk") - .withDisplayName("kjjeokbz"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java deleted file mode 100644 index c35f18e825ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterTests { - @Test - public void testDeserialize() { - BillingMeter model = - BinaryData - .fromString( - "{\"location\":\"lm\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"cvhd\",\"displayName\":\"v\"},\"id\":\"qxeysko\",\"name\":\"qzinkfkbg\",\"type\":\"z\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeter model = - new BillingMeter() - .withLocation("lm") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("cvhd") - .withDisplayName("v")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index 11d95a597703..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java +++ /dev/null @@ -1,53 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CertificatePatchTests { - @Test - public void testDeserialize() { - CertificatePatch model = - BinaryData - .fromString( - "{\"tags\":{\"jc\":\"gkbugrjqct\",\"cuplcplcwkhih\":\"isofieypefojyqd\",\"cjhfgmvecactxmw\":\"hlhzdsqtzbsrgno\",\"ovekqvgqouwi\":\"teyowclu\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @Test - public void testSerialize() { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf( - "jc", - "gkbugrjqct", - "cuplcplcwkhih", - "isofieypefojyqd", - "cjhfgmvecactxmw", - "hlhzdsqtzbsrgno", - "ovekqvgqouwi", - "teyowclu")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 2f76d29ef3ea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityRequestTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"mpjw\",\"type\":\"vqikfxcvhrfsphu\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.type()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("mpjw").withType("vqikfxcvhrfsphu"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 5da5bcd5937f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityResponseInnerTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"kteusqczk\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("kteusqczk"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java deleted file mode 100644 index fed359577d5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientRegistrationTests { - @Test - public void testDeserialize() { - ClientRegistration model = - BinaryData - .fromString("{\"clientId\":\"ocjjxhvpmouexh\",\"clientSecretSettingName\":\"xibqeojnx\"}") - .toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - ClientRegistration model = - new ClientRegistration().withClientId("ocjjxhvpmouexh").withClientSecretSettingName("xibqeojnx"); - model = BinaryData.fromObject(model).toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java deleted file mode 100644 index f8f5a94b6854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java +++ /dev/null @@ -1,183 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConfigurationTests { - @Test - public void testDeserialize() { - Configuration model = - BinaryData - .fromString( - "{\"secrets\":[{\"name\":\"kn\",\"value\":\"scwsv\"},{\"name\":\"otogtwrupqs\",\"value\":\"nmic\"}],\"activeRevisionsMode\":\"Multiple\",\"ingress\":{\"fqdn\":\"o\",\"external\":false,\"targetPort\":2060505199,\"exposedPort\":1344905503,\"transport\":\"tcp\",\"traffic\":[{\"revisionName\":\"fcnj\",\"weight\":534363981,\"latestRevision\":false,\"label\":\"hbttkphyw\"}],\"customDomains\":[{\"name\":\"jtoqne\",\"bindingType\":\"Disabled\",\"certificateId\":\"lfplp\"},{\"name\":\"oxuscrpabgyepsbj\",\"bindingType\":\"Disabled\",\"certificateId\":\"qugxywpmueefjzwf\"},{\"name\":\"kqujidsuyono\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"aocqxtccmgy\"},{\"name\":\"dxyt\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"yrxvwfudwpznt\"}],\"allowInsecure\":false,\"ipSecurityRestrictions\":[{\"name\":\"lrqjbhckfr\",\"description\":\"rxsbkyvp\",\"ipAddressRange\":\"ca\",\"action\":\"Deny\"}]},\"registries\":[{\"server\":\"zka\",\"username\":\"uwbc\",\"passwordSecretRef\":\"wbme\",\"identity\":\"seyvj\"},{\"server\":\"rts\",\"username\":\"spkdee\",\"passwordSecretRef\":\"ofmxagkvtmelmqkr\",\"identity\":\"hvljuahaquh\"},{\"server\":\"hmdua\",\"username\":\"exq\",\"passwordSecretRef\":\"fadmws\",\"identity\":\"r\"}],\"dapr\":{\"enabled\":false,\"appId\":\"gomz\",\"appProtocol\":\"http\",\"appPort\":491284864,\"httpReadBufferSize\":838222488,\"httpMaxRequestSize\":1787960878,\"logLevel\":\"error\",\"enableApiLogging\":true},\"maxInactiveRevisions\":941784903}") - .toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } - - @Test - public void testSerialize() { - Configuration model = - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("kn").withValue("scwsv"), - new Secret().withName("otogtwrupqs").withValue("nmic"))) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withIngress( - new Ingress() - .withExternal(false) - .withTargetPort(2060505199) - .withExposedPort(1344905503) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("fcnj") - .withWeight(534363981) - .withLatestRevision(false) - .withLabel("hbttkphyw"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("jtoqne") - .withBindingType(BindingType.DISABLED) - .withCertificateId("lfplp"), - new CustomDomain() - .withName("oxuscrpabgyepsbj") - .withBindingType(BindingType.DISABLED) - .withCertificateId("qugxywpmueefjzwf"), - new CustomDomain() - .withName("kqujidsuyono") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("aocqxtccmgy"), - new CustomDomain() - .withName("dxyt") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("yrxvwfudwpznt"))) - .withAllowInsecure(false) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("lrqjbhckfr") - .withDescription("rxsbkyvp") - .withIpAddressRange("ca") - .withAction(Action.DENY)))) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("zka") - .withUsername("uwbc") - .withPasswordSecretRef("wbme") - .withIdentity("seyvj"), - new RegistryCredentials() - .withServer("rts") - .withUsername("spkdee") - .withPasswordSecretRef("ofmxagkvtmelmqkr") - .withIdentity("hvljuahaquh"), - new RegistryCredentials() - .withServer("hmdua") - .withUsername("exq") - .withPasswordSecretRef("fadmws") - .withIdentity("r"))) - .withDapr( - new Dapr() - .withEnabled(false) - .withAppId("gomz") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(491284864) - .withHttpReadBufferSize(838222488) - .withHttpMaxRequestSize(1787960878) - .withLogLevel(LogLevel.ERROR) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(941784903); - model = BinaryData.fromObject(model).toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java deleted file mode 100644 index 511f3f22c608..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java +++ /dev/null @@ -1,105 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentCollectionTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"rtujwsawddjibab\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InfrastructureSetupComplete\",\"deploymentErrors\":\"tzeexav\",\"defaultDomain\":\"tfgle\",\"staticIp\":\"m\",\"daprAIConnectionString\":\"bwpypqtgsfjacb\"},\"location\":\"hxudbxvodht\",\"tags\":{\"agzrcxfa\":\"rudhzmmesckdl\",\"xwmdboxd\":\"lc\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"},{\"extendedLocation\":{\"name\":\"kqg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InitializationInProgress\",\"deploymentErrors\":\"broyla\",\"defaultDomain\":\"ulcdisdosf\",\"staticIp\":\"jsvg\",\"daprAIConnectionString\":\"whryvycytdcl\"},\"location\":\"cknfnwmbtmvpd\",\"tags\":{\"efedxihchrphkm\":\"httz\",\"gtgkylkdghr\":\"rjdqnsdfzp\",\"kvbwnhhtqlgeh\":\"euutlwxezwzh\",\"vgcxtx\":\"ppipifhpfeoa\"},\"id\":\"csheafidltugsr\",\"name\":\"smkss\",\"type\":\"h\"},{\"extendedLocation\":{\"name\":\"txfkfweg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"lucbiqtgdqohm\",\"defaultDomain\":\"sldrizetpwbral\",\"staticIp\":\"ibph\",\"daprAIConnectionString\":\"zmizakakan\"},\"location\":\"dnjzh\",\"tags\":{\"oyxprimr\":\"ylhjlm\",\"eislstvasylwx\":\"opteecj\",\"eoohguufuzboyj\":\"zaum\",\"a\":\"thwtzol\"},\"id\":\"mwmdxmebwjscjpa\",\"name\":\"lxveabfqx\",\"type\":\"mwmqtibx\"}],\"nextLink\":\"jddtvqct\"}") - .toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentCollection model = - new ConnectedEnvironmentCollection() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentInner() - .withLocation("hxudbxvodht") - .withTags(mapOf("agzrcxfa", "rudhzmmesckdl", "xwmdboxd", "lc")) - .withExtendedLocation( - new ExtendedLocation() - .withName("rtujwsawddjibab") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("m") - .withDaprAIConnectionString("bwpypqtgsfjacb"), - new ConnectedEnvironmentInner() - .withLocation("cknfnwmbtmvpd") - .withTags( - mapOf( - "efedxihchrphkm", - "httz", - "gtgkylkdghr", - "rjdqnsdfzp", - "kvbwnhhtqlgeh", - "euutlwxezwzh", - "vgcxtx", - "ppipifhpfeoa")) - .withExtendedLocation( - new ExtendedLocation() - .withName("kqg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("jsvg") - .withDaprAIConnectionString("whryvycytdcl"), - new ConnectedEnvironmentInner() - .withLocation("dnjzh") - .withTags( - mapOf( - "oyxprimr", - "ylhjlm", - "eislstvasylwx", - "opteecj", - "eoohguufuzboyj", - "zaum", - "a", - "thwtzol")) - .withExtendedLocation( - new ExtendedLocation() - .withName("txfkfweg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ibph") - .withDaprAIConnectionString("zmizakakan"))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java deleted file mode 100644 index 7c98ab325595..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java +++ /dev/null @@ -1,65 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"ijaeukm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ndzaapmudq\",\"defaultDomain\":\"qwigpibudqwyxe\",\"staticIp\":\"ybpmzznrtffyaq\",\"daprAIConnectionString\":\"mhh\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"qaqhvseufu\",\"dnsSuffix\":\"rxpdlcgqlsi\",\"expirationDate\":\"2021-05-24T18:35:38Z\",\"thumbprint\":\"ddgamquhiosr\",\"subjectName\":\"uivfcdis\"}},\"location\":\"rnxzh\",\"tags\":{\"qvwre\":\"xrxzbujrtr\",\"nzonzl\":\"khgn\",\"jtszcof\":\"piqywnc\",\"k\":\"zehtdhgb\"},\"id\":\"reljeamur\",\"name\":\"zmlovuanash\",\"type\":\"xlpm\"}") - .toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentInner model = - new ConnectedEnvironmentInner() - .withLocation("rnxzh") - .withTags(mapOf("qvwre", "xrxzbujrtr", "nzonzl", "khgn", "jtszcof", "piqywnc", "k", "zehtdhgb")) - .withExtendedLocation( - new ExtendedLocation().withName("ijaeukm").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ybpmzznrtffyaq") - .withDaprAIConnectionString("mhh") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("rxpdlcgqlsi")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java deleted file mode 100644 index 1dcf7976eed2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentProperties; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentPropertiesTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"InfrastructureSetupInProgress\",\"deploymentErrors\":\"dk\",\"defaultDomain\":\"vidizozsdb\",\"staticIp\":\"xjmonf\",\"daprAIConnectionString\":\"nwncypuuw\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"v\",\"dnsSuffix\":\"jctzenkei\",\"expirationDate\":\"2021-11-19T10:45:07Z\",\"thumbprint\":\"dasvfl\",\"subjectName\":\"bxcudchx\"}}") - .toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentProperties model = - new ConnectedEnvironmentProperties() - .withStaticIp("xjmonf") - .withDaprAIConnectionString("nwncypuuw") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("jctzenkei")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 77b5f9f5f58d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ldforobwj\",\"name\":\"vizbfhfo\",\"type\":\"vacqpbtuodxesz\"},{\"properties\":{},\"id\":\"l\",\"name\":\"wumuaslzk\",\"type\":\"rrwoycqucwyhahn\"},{\"properties\":{},\"id\":\"kywuhpsvfuu\",\"name\":\"utlwexxwla\",\"type\":\"niexzsrzpgepq\"}]}") - .toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentStoragesCollectionInner model = - new ConnectedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java deleted file mode 100644 index 1ae6489b0f96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,100 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"extendedLocation\":{\"name\":\"suckzm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentErrors\":\"xaxmq\",\"defaultDomain\":\"alhhjnhgwydyynfs\",\"staticIp\":\"hgbvqtan\",\"daprAIConnectionString\":\"fdlpukhpyr\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"zjcpeogk\",\"dnsSuffix\":\"mgbro\",\"expirationDate\":\"2021-08-20T12:22:55Z\",\"thumbprint\":\"fhp\",\"subjectName\":\"azjzo\"}},\"location\":\"jxhpdulontacn\",\"tags\":{\"xh\":\"tehtuevrhrljyoog\"},\"id\":\"sd\",\"name\":\"ugwbsreurfqkf\",\"type\":\"arenlvhhtklnvnaf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConnectedEnvironment response = - manager - .connectedEnvironments() - .define("usqogsfikayia") - .withRegion("chrszi") - .withExistingResourceGroup("ijtk") - .withTags(mapOf("fqyggagflnlgmtr", "uelyetndn")) - .withExtendedLocation( - new ExtendedLocation().withName("arujt").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("bqeqqekewvnqvcd") - .withDaprAIConnectionString("uaucmf") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("itacgxmfcsserx")) - .create(); - - Assertions.assertEquals("jxhpdulontacn", response.location()); - Assertions.assertEquals("tehtuevrhrljyoog", response.tags().get("xh")); - Assertions.assertEquals("suckzm", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals("hgbvqtan", response.staticIp()); - Assertions.assertEquals("fdlpukhpyr", response.daprAIConnectionString()); - Assertions.assertEquals("mgbro", response.customDomainConfiguration().dnsSuffix()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java deleted file mode 100644 index 352da9aeea5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java +++ /dev/null @@ -1,74 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"componentType\":\"rymo\",\"version\":\"zrxklobd\",\"ignoreErrors\":true,\"initTimeout\":\"pmkmlmvevfx\",\"secrets\":[],\"secretStoreComponent\":\"hbzxli\",\"metadata\":[],\"scopes\":[\"dtfgxqbawpcbb\"]},\"id\":\"qcy\",\"name\":\"napqo\",\"type\":\"yuicdhzbdy\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.connectedEnvironmentsDaprComponents().list("vroevytlyo", "rrrouuxvnsa", Context.NONE); - - Assertions.assertEquals("rymo", response.iterator().next().componentType()); - Assertions.assertEquals("zrxklobd", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("pmkmlmvevfx", response.iterator().next().initTimeout()); - Assertions.assertEquals("hbzxli", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("dtfgxqbawpcbb", response.iterator().next().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 9d10d4deec7c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironments().delete("djk", "sysidfvclglxnf", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java deleted file mode 100644 index b4ae858aa596..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java +++ /dev/null @@ -1,77 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"pusxjb\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ohzjqatucoigeb\",\"defaultDomain\":\"cnwfepbnwgfmxjg\",\"staticIp\":\"bjb\",\"daprAIConnectionString\":\"lfgtdysnaquflqbc\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"amz\",\"dnsSuffix\":\"wdkqzeqy\",\"expirationDate\":\"2021-03-27T03:11:25Z\",\"thumbprint\":\"njxdfzantk\",\"subjectName\":\"eg\"}},\"location\":\"mlbnseq\",\"tags\":{\"m\":\"jvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\",\"vcjkgd\":\"cslmotoebnfxo\",\"vcopex\":\"razftxejwabmdujt\"},\"id\":\"m\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.connectedEnvironments().listByResourceGroup("cbuewmrswnjlxuz", Context.NONE); - - Assertions.assertEquals("mlbnseq", response.iterator().next().location()); - Assertions.assertEquals("jvpilguooqja", response.iterator().next().tags().get("m")); - Assertions.assertEquals("pusxjb", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("bjb", response.iterator().next().staticIp()); - Assertions.assertEquals("lfgtdysnaquflqbc", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("wdkqzeqy", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java deleted file mode 100644 index 9b849fecf348..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"wpnulaiywzejyw\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"ScheduledForDelete\",\"deploymentErrors\":\"pllndnp\",\"defaultDomain\":\"rpqaf\",\"staticIp\":\"ug\",\"daprAIConnectionString\":\"n\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"et\",\"dnsSuffix\":\"ypococtfjgtixr\",\"expirationDate\":\"2021-06-13T22:05:20Z\",\"thumbprint\":\"urmlmuo\",\"subjectName\":\"lbau\"}},\"location\":\"opionszon\",\"tags\":{\"jmyccxlzhcoxov\":\"gajinnixjawrtmj\",\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\"},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.connectedEnvironments().list(Context.NONE); - - Assertions.assertEquals("opionszon", response.iterator().next().location()); - Assertions.assertEquals("gajinnixjawrtmj", response.iterator().next().tags().get("jmyccxlzhcoxov")); - Assertions.assertEquals("wpnulaiywzejyw", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("ug", response.iterator().next().staticIp()); - Assertions.assertEquals("n", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("ypococtfjgtixr", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java deleted file mode 100644 index 57d5fded6438..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java +++ /dev/null @@ -1,108 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppCollectionTests { - @Test - public void testDeserialize() { - ContainerAppCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"ybcibvyvdcsit\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"f\",\"environmentId\":\"scjeypv\",\"workloadProfileType\":\"zrkgqhcjrefovg\",\"latestRevisionName\":\"qsl\",\"latestRevisionFqdn\":\"yvxyqjp\",\"customDomainVerificationId\":\"attpngjcrcczsq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"daj\"},\"location\":\"ysou\",\"tags\":{\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"},{\"extendedLocation\":{\"name\":\"gf\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Deleting\",\"managedEnvironmentId\":\"twhrdxwzywqsm\",\"environmentId\":\"ureximoryocfs\",\"workloadProfileType\":\"s\",\"latestRevisionName\":\"ddystkiiuxhqy\",\"latestRevisionFqdn\":\"xorrqnb\",\"customDomainVerificationId\":\"czvyifq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"jsllrmv\"},\"location\":\"f\",\"tags\":{\"wiqzbqjvsovmyo\":\"kpnpulexxbczwtr\"},\"id\":\"acspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"},{\"extendedLocation\":{\"name\":\"iwkuofos\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"xieduugidyjrr\",\"environmentId\":\"y\",\"workloadProfileType\":\"svexcsonpclhoco\",\"latestRevisionName\":\"lkevle\",\"latestRevisionFqdn\":\"zfbuhf\",\"customDomainVerificationId\":\"faxkffeii\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"ez\"},\"location\":\"shxmzsbbzoggigrx\",\"tags\":{\"jnspydp\":\"rvjx\"},\"id\":\"koen\",\"name\":\"ou\",\"type\":\"nvudwtiukb\"}],\"nextLink\":\"ngkpocipazy\"}") - .toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @Test - public void testSerialize() { - ContainerAppCollection model = - new ContainerAppCollection() - .withValue( - Arrays - .asList( - new ContainerAppInner() - .withLocation("ysou") - .withTags(mapOf("yhltrpmopjmcm", "canoaeupf")) - .withExtendedLocation( - new ExtendedLocation() - .withName("ybcibvyvdcsit") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("f") - .withEnvironmentId("scjeypv") - .withWorkloadProfileType("zrkgqhcjrefovg"), - new ContainerAppInner() - .withLocation("f") - .withTags(mapOf("wiqzbqjvsovmyo", "kpnpulexxbczwtr")) - .withExtendedLocation( - new ExtendedLocation() - .withName("gf") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("twhrdxwzywqsm") - .withEnvironmentId("ureximoryocfs") - .withWorkloadProfileType("s"), - new ContainerAppInner() - .withLocation("shxmzsbbzoggigrx") - .withTags(mapOf("jnspydp", "rvjx")) - .withExtendedLocation( - new ExtendedLocation() - .withName("iwkuofos") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xieduugidyjrr") - .withEnvironmentId("y") - .withWorkloadProfileType("svexcsonpclhoco"))); - model = BinaryData.fromObject(model).toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java deleted file mode 100644 index 09fb61485df1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java +++ /dev/null @@ -1,95 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppInnerTests { - @Test - public void testDeserialize() { - ContainerAppInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"gukgjnpiucgygevq\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"c\":{}}},\"properties\":{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"dpydn\",\"environmentId\":\"hxdeoejz\",\"workloadProfileType\":\"w\",\"latestRevisionName\":\"sjttgzfbish\",\"latestRevisionFqdn\":\"khaj\",\"customDomainVerificationId\":\"yeamdphagalpb\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1833977837},\"template\":{\"revisionSuffix\":\"shwankixzbinje\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"zoqftiyqzrnkcqvy\",\"lwh\"],\"eventStreamEndpoint\":\"sicohoqqnwvlry\"},\"location\":\"w\",\"tags\":{\"gyxzk\":\"unmmq\"},\"id\":\"noc\",\"name\":\"koklya\",\"type\":\"uconuqszfkbey\"}") - .toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @Test - public void testSerialize() { - ContainerAppInner model = - new ContainerAppInner() - .withLocation("w") - .withTags(mapOf("gyxzk", "unmmq")) - .withExtendedLocation( - new ExtendedLocation().withName("gukgjnpiucgygevq").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("c", new UserAssignedIdentity()))) - .withManagedEnvironmentId("dpydn") - .withEnvironmentId("hxdeoejz") - .withWorkloadProfileType("w") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1833977837)) - .withTemplate( - new Template() - .withRevisionSuffix("shwankixzbinje") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())); - model = BinaryData.fromObject(model).toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 7a49f669c8f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - BinaryData - .fromString("{\"name\":\"fcktqumiekke\",\"value\":\"zikhl\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", model.value()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("fcktqumiekke").withValue("zikhl"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java deleted file mode 100644 index e24fca86a780..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,55 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGet model = - BinaryData - .fromString( - "{\"host\":\"jawneaiv\",\"httpHeaders\":[{\"name\":\"zel\",\"value\":\"c\"},{\"name\":\"r\",\"value\":\"lsfeaenwabfatkld\"},{\"name\":\"xbjhwuaanozjosph\",\"value\":\"oulpjrv\"}],\"path\":\"glrvimjwosytxi\",\"port\":1413257471,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("jawneaiv") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("zel").withValue("c"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("r").withValue("lsfeaenwabfatkld"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xbjhwuaanozjosph") - .withValue("oulpjrv"))) - .withPath("glrvimjwosytxi") - .withPort(1413257471) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java deleted file mode 100644 index e4903494ed13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTcpSocketTests { - @Test - public void testDeserialize() { - ContainerAppProbeTcpSocket model = - BinaryData - .fromString("{\"host\":\"jhdgqggebdunyga\",\"port\":2021053825}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, model.port()); - } - - @Test - public void testSerialize() { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("jhdgqggebdunyga").withPort(2021053825); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, model.port()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java deleted file mode 100644 index 9ff7131fd14d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,88 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTests { - @Test - public void testDeserialize() { - ContainerAppProbe model = - BinaryData - .fromString( - "{\"failureThreshold\":1892001157,\"httpGet\":{\"host\":\"rhyrnxxmueed\",\"httpHeaders\":[{\"name\":\"dvstkw\",\"value\":\"qtc\"},{\"name\":\"ealmfmtdaaygdvwv\",\"value\":\"piohgwxrtfu\"},{\"name\":\"xepxgyqagvrvmn\",\"value\":\"k\"}],\"path\":\"ghimdblx\",\"port\":505358997,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1046627826,\"periodSeconds\":984160598,\"successThreshold\":44093722,\"tcpSocket\":{\"host\":\"mszkkfo\",\"port\":739435613},\"terminationGracePeriodSeconds\":6713909564686368420,\"timeoutSeconds\":520152641,\"type\":\"Readiness\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } - - @Test - public void testSerialize() { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1892001157) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("rhyrnxxmueed") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("dvstkw").withValue("qtc"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("ealmfmtdaaygdvwv") - .withValue("piohgwxrtfu"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xepxgyqagvrvmn") - .withValue("k"))) - .withPath("ghimdblx") - .withPort(505358997) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1046627826) - .withPeriodSeconds(984160598) - .withSuccessThreshold(44093722) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("mszkkfo").withPort(739435613)) - .withTerminationGracePeriodSeconds(6713909564686368420L) - .withTimeoutSeconds(520152641) - .withType(Type.READINESS); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java deleted file mode 100644 index 5547a7f4e8e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java +++ /dev/null @@ -1,225 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppProperties; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppPropertiesTests { - @Test - public void testDeserialize() { - ContainerAppProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"i\",\"environmentId\":\"hxepcyvahfnlj\",\"workloadProfileType\":\"qxj\",\"latestRevisionName\":\"ujqgidok\",\"latestRevisionFqdn\":\"ljyoxgvcltb\",\"customDomainVerificationId\":\"ncghkje\",\"configuration\":{\"secrets\":[{\"name\":\"ijhtxf\",\"value\":\"xbf\"},{\"name\":\"xnehmpvec\",\"value\":\"odebfqkkrbmpu\"},{\"name\":\"riwflzlfb\",\"value\":\"puz\"}],\"activeRevisionsMode\":\"Single\",\"ingress\":{\"fqdn\":\"nqzahmgkbrpyyd\",\"external\":true,\"targetPort\":1877210635,\"exposedPort\":2043148337,\"transport\":\"http\",\"traffic\":[],\"customDomains\":[],\"allowInsecure\":true,\"ipSecurityRestrictions\":[]},\"registries\":[{\"server\":\"n\",\"username\":\"ynhijggme\",\"passwordSecretRef\":\"siarbutrcvpn\",\"identity\":\"zmhjrunmp\"}],\"dapr\":{\"enabled\":true,\"appId\":\"hrbnlankxmyskpbh\",\"appProtocol\":\"grpc\",\"appPort\":2131694851,\"httpReadBufferSize\":2016648328,\"httpMaxRequestSize\":83692384,\"logLevel\":\"info\",\"enableApiLogging\":false},\"maxInactiveRevisions\":1863766018},\"template\":{\"revisionSuffix\":\"lqidyby\",\"initContainers\":[{\"image\":\"clha\",\"name\":\"dbabp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"thsu\",\"name\":\"cmnyyazttb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"dckzywbiexz\",\"name\":\"yueaxibxujwb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"yoxa\",\"name\":\"dkzjancuxrh\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"iwdjswztsdbpgn\",\"name\":\"txhp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":262767805,\"maxReplicas\":1638223797,\"rules\":[]},\"volumes\":[{\"name\":\"tcty\",\"storageType\":\"AzureFile\",\"storageName\":\"bbovplwzbhvgyugu\"},{\"name\":\"vmkfssxqu\",\"storageType\":\"AzureFile\",\"storageName\":\"l\"},{\"name\":\"gsxnkjzkdeslpv\",\"storageType\":\"AzureFile\",\"storageName\":\"i\"},{\"name\":\"ghxpkdw\",\"storageType\":\"EmptyDir\",\"storageName\":\"uebbaumnyqup\"}]},\"outboundIpAddresses\":[\"ojnabckhsmtxpsie\",\"tfhvpesapskrdqmh\"],\"eventStreamEndpoint\":\"dhtldwkyz\"}") - .toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - ContainerAppProperties model = - new ContainerAppProperties() - .withManagedEnvironmentId("i") - .withEnvironmentId("hxepcyvahfnlj") - .withWorkloadProfileType("qxj") - .withConfiguration( - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("ijhtxf").withValue("xbf"), - new Secret().withName("xnehmpvec").withValue("odebfqkkrbmpu"), - new Secret().withName("riwflzlfb").withValue("puz"))) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(1877210635) - .withExposedPort(2043148337) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic(Arrays.asList()) - .withCustomDomains(Arrays.asList()) - .withAllowInsecure(true) - .withIpSecurityRestrictions(Arrays.asList())) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("n") - .withUsername("ynhijggme") - .withPasswordSecretRef("siarbutrcvpn") - .withIdentity("zmhjrunmp"))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppId("hrbnlankxmyskpbh") - .withAppProtocol(AppProtocol.GRPC) - .withAppPort(2131694851) - .withHttpReadBufferSize(2016648328) - .withHttpMaxRequestSize(83692384) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(false)) - .withMaxInactiveRevisions(1863766018)) - .withTemplate( - new Template() - .withRevisionSuffix("lqidyby") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("clha") - .withName("dbabp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("thsu") - .withName("cmnyyazttb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("dckzywbiexz") - .withName("yueaxibxujwb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("yoxa") - .withName("dkzjancuxrh") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("iwdjswztsdbpgn") - .withName("txhp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(262767805) - .withMaxReplicas(1638223797) - .withRules(Arrays.asList())) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("tcty") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("bbovplwzbhvgyugu"), - new Volume() - .withName("vmkfssxqu") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("l"), - new Volume() - .withName("gsxnkjzkdeslpv") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("i"), - new Volume() - .withName("ghxpkdw") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("uebbaumnyqup")))); - model = BinaryData.fromObject(model).toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java deleted file mode 100644 index 084242df7a48..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import org.junit.jupiter.api.Test; - -public final class ContainerAppSecretTests { - @Test - public void testDeserialize() { - ContainerAppSecret model = - BinaryData - .fromString("{\"name\":\"deibqip\",\"value\":\"ghvxndzwmkrefa\"}") - .toObject(ContainerAppSecret.class); - } - - @Test - public void testSerialize() { - ContainerAppSecret model = new ContainerAppSecret(); - model = BinaryData.fromObject(model).toObject(ContainerAppSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java deleted file mode 100644 index 11a175e7be13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java +++ /dev/null @@ -1,78 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"vz\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"RedirectToLoginPage\",\"redirectToProvider\":\"fbzdixzmqpnoda\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"atutmzlbiojlvfhr\",\"name\":\"bpneqvcwwyyurm\",\"type\":\"chpp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsAuthConfigs().listByContainerApp("fezrx", "czurtlei", Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().platform().enabled()); - Assertions.assertEquals("vz", response.iterator().next().platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - response.iterator().next().globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("fbzdixzmqpnoda", response.iterator().next().globalValidation().redirectToProvider()); - Assertions.assertEquals(false, response.iterator().next().login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.iterator().next().httpSettings().requireHttps()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java deleted file mode 100644 index 2a395092867a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,125 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"extendedLocation\":{\"name\":\"kiwbuqnyoph\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Succeeded\",\"managedEnvironmentId\":\"nezzcezelfwyfwlw\",\"environmentId\":\"wetnpsihc\",\"workloadProfileType\":\"fzvaylptr\",\"latestRevisionName\":\"qwztcmwqkc\",\"latestRevisionFqdn\":\"xwaxfewzjkj\",\"customDomainVerificationId\":\"fdeqvhpsyl\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Multiple\",\"registries\":[],\"maxInactiveRevisions\":919245965},\"template\":{\"revisionSuffix\":\"zjrgyww\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"tf\",\"jgicgaao\",\"pttaqutd\",\"wemxswvruunzz\"],\"eventStreamEndpoint\":\"ehkfkimrtixok\"},\"location\":\"qyinl\",\"tags\":{\"hiyxgvelfclduc\":\"pqwhixmonst\"},\"id\":\"birdsvuwcobiegs\",\"name\":\"mninwjizcilng\",\"type\":\"gshejjtbxqmulux\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerApp response = - manager - .containerApps() - .define("fgtayxonsup") - .withRegion("rylniofrzg") - .withExistingResourceGroup("mv") - .withTags(mapOf("tkvnlvxbcuiiznkt", "edm")) - .withExtendedLocation( - new ExtendedLocation().withName("lzqnhcvs").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xfyqonmpqoxwdo") - .withEnvironmentId("bxiqxeiiqbimht") - .withWorkloadProfileType("winhehfqpo") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1610520770)) - .withTemplate( - new Template() - .withRevisionSuffix("zuwfmdur") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())) - .create(); - - Assertions.assertEquals("qyinl", response.location()); - Assertions.assertEquals("pqwhixmonst", response.tags().get("hiyxgvelfclduc")); - Assertions.assertEquals("kiwbuqnyoph", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nezzcezelfwyfwlw", response.managedEnvironmentId()); - Assertions.assertEquals("wetnpsihc", response.environmentId()); - Assertions.assertEquals("fzvaylptr", response.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, response.configuration().activeRevisionsMode()); - Assertions.assertEquals(919245965, response.configuration().maxInactiveRevisions()); - Assertions.assertEquals("zjrgyww", response.template().revisionSuffix()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index bd21d8edc4a5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerApps().delete("ljhlnymzotq", "ryuzcbmqqv", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index ad2bcd84fa70..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,71 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"eq\",\"name\":\"arvlagunbt\",\"description\":\"ebwlnbmhyreeudzq\",\"author\":\"bpdqmjxlyy\",\"category\":\"lgouwtlmjj\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"qtobaxkjeyt\",\"score\":38.508713},\"dataset\":[],\"status\":{\"message\":\"wrus\",\"statusId\":1630715289},\"dataProviderMetadata\":{\"providerName\":\"syrq\",\"propertyBag\":[]}},\"id\":\"qhd\",\"name\":\"nxaulk\",\"type\":\"akdkifmjnnawtqab\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listDetectors("tz", "atbhjmznn", Context.NONE); - - Assertions.assertEquals("wrus", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1630715289, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("syrq", response.iterator().next().properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java deleted file mode 100644 index 42bf66cb1ba8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java +++ /dev/null @@ -1,66 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-23T09:27:28Z\",\"lastActiveTime\":\"2021-02-12T07:54:43Z\",\"fqdn\":\"pxiwf\",\"template\":{\"revisionSuffix\":\"jsa\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":1850415836,\"trafficWeight\":337037006,\"provisioningError\":\"viirhgfgrws\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"zvzbglbyv\",\"name\":\"ctctbrxkjz\",\"type\":\"rgxffmshkw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listRevisions("xuckpggqoweyir", "hlisngw", "lqqmpiz", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java deleted file mode 100644 index 7b4533edc0b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java +++ /dev/null @@ -1,86 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"f\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"s\",\"environmentId\":\"rioov\",\"workloadProfileType\":\"dsxwaab\",\"latestRevisionName\":\"ifrygzn\",\"latestRevisionFqdn\":\"axri\",\"customDomainVerificationId\":\"zob\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1673403007},\"template\":{\"revisionSuffix\":\"ieixynllxe\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"hslhca\",\"jutifdwfmvigorqj\",\"ttzhra\",\"lkafhonqjuje\"],\"eventStreamEndpoint\":\"kpzvcpopmxelnwc\"},\"location\":\"yjede\",\"tags\":{\"scazuawxtzxpu\":\"lfmk\",\"s\":\"mwabzxrvxc\"},\"id\":\"sphaivmxyasflvg\",\"name\":\"gzwywak\",\"type\":\"ihknsmjbl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerApps().listByResourceGroup("ptgoeiybbabp", Context.NONE); - - Assertions.assertEquals("yjede", response.iterator().next().location()); - Assertions.assertEquals("lfmk", response.iterator().next().tags().get("scazuawxtzxpu")); - Assertions.assertEquals("f", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("s", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("rioov", response.iterator().next().environmentId()); - Assertions.assertEquals("dsxwaab", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(1673403007, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("ieixynllxe", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java deleted file mode 100644 index b5de8d1f9c26..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java +++ /dev/null @@ -1,85 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"extendedLocation\":{\"name\":\"snmokayzej\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"jh\",\"environmentId\":\"zv\",\"workloadProfileType\":\"h\",\"latestRevisionName\":\"bnwieholew\",\"latestRevisionFqdn\":\"iuubwefqsf\",\"customDomainVerificationId\":\"aqtferr\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":2076529802},\"template\":{\"revisionSuffix\":\"wogqqnobpudcdab\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"wbzasqbuclj\",\"kyexaoguyaipi\"],\"eventStreamEndpoint\":\"daultxijjumfq\"},\"location\":\"z\",\"tags\":{\"jng\":\"nm\",\"bjwgnyfus\":\"qdqx\",\"fh\":\"zsvtuikzhajqgl\"},\"id\":\"l\",\"name\":\"qryxyn\",\"type\":\"nzrdpsovwxz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.containerApps().list(Context.NONE); - - Assertions.assertEquals("z", response.iterator().next().location()); - Assertions.assertEquals("nm", response.iterator().next().tags().get("jng")); - Assertions.assertEquals("snmokayzej", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jh", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("zv", response.iterator().next().environmentId()); - Assertions.assertEquals("h", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(2076529802, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("wogqqnobpudcdab", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java deleted file mode 100644 index ddca831f448b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java +++ /dev/null @@ -1,66 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-03-07T21:38:43Z\",\"lastActiveTime\":\"2021-11-24T18:55:58Z\",\"fqdn\":\"ziqgfuh\",\"template\":{\"revisionSuffix\":\"ruswhv\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":1235050131,\"trafficWeight\":1910463572,\"provisioningError\":\"xjww\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"wmxqhndvnoamlds\",\"name\":\"haohdjhhflzokxc\",\"type\":\"xpelnjetagltsx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsRevisions().listRevisions("xqzv", "ers", "ycucrwnamikzeb", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java deleted file mode 100644 index f06d91975a1d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,89 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"k\",\"branch\":\"qirwrweoox\",\"githubActionConfiguration\":{\"contextPath\":\"xwrsnew\",\"image\":\"zqvbubqm\",\"publishType\":\"hsycxhxzgaz\",\"os\":\"abo\",\"runtimeStack\":\"vmfqhppubo\",\"runtimeVersion\":\"epdfgkmtdherng\"}},\"id\":\"c\",\"name\":\"uahokq\",\"type\":\"obkauxofsh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SourceControl response = - manager - .containerAppsSourceControls() - .define("btozipqwje") - .withExistingContainerApp("neiknpg", "xgjiuqh") - .withRepoUrl("xxgewpk") - .withBranch("qylkmqpzoyhlf") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("cloxo") - .withImage("qinjipnwjf") - .withPublishType("qlafcbahhpzpofoi") - .withOs("w") - .withRuntimeStack("ilkmk") - .withRuntimeVersion("olvdnd")) - .create(); - - Assertions.assertEquals("k", response.repoUrl()); - Assertions.assertEquals("qirwrweoox", response.branch()); - Assertions.assertEquals("xwrsnew", response.githubActionConfiguration().contextPath()); - Assertions.assertEquals("zqvbubqm", response.githubActionConfiguration().image()); - Assertions.assertEquals("hsycxhxzgaz", response.githubActionConfiguration().publishType()); - Assertions.assertEquals("abo", response.githubActionConfiguration().os()); - Assertions.assertEquals("vmfqhppubo", response.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("epdfgkmtdherng", response.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 210da113c01d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsSourceControls().delete("vtxnjmxmcuqud", "cvclxynpdk", "gfabuiyjibuzphdu", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java deleted file mode 100644 index 485e870c2ee3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java +++ /dev/null @@ -1,80 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"zszuwiwtglxx\",\"branch\":\"jfpgpicrmn\",\"githubActionConfiguration\":{\"contextPath\":\"qgjsxvpqcbfrmbod\",\"image\":\"s\",\"publishType\":\"gvriibakclac\",\"os\":\"rnxousxauzlwvsg\",\"runtimeStack\":\"ohqfzizv\",\"runtimeVersion\":\"mmkjsvthnwpztek\"}},\"id\":\"mribiat\",\"name\":\"gplucfotangcfhny\",\"type\":\"zcugswvxwlmzqw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .containerAppsSourceControls() - .listByContainerApp("zdfuydzvkfvxcnqm", "qpswokmvkhlggdhb", Context.NONE); - - Assertions.assertEquals("zszuwiwtglxx", response.iterator().next().repoUrl()); - Assertions.assertEquals("jfpgpicrmn", response.iterator().next().branch()); - Assertions - .assertEquals("qgjsxvpqcbfrmbod", response.iterator().next().githubActionConfiguration().contextPath()); - Assertions.assertEquals("s", response.iterator().next().githubActionConfiguration().image()); - Assertions.assertEquals("gvriibakclac", response.iterator().next().githubActionConfiguration().publishType()); - Assertions.assertEquals("rnxousxauzlwvsg", response.iterator().next().githubActionConfiguration().os()); - Assertions.assertEquals("ohqfzizv", response.iterator().next().githubActionConfiguration().runtimeStack()); - Assertions - .assertEquals("mmkjsvthnwpztek", response.iterator().next().githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index e885f4068cb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerResourcesTests { - @Test - public void testDeserialize() { - ContainerResources model = - BinaryData - .fromString( - "{\"cpu\":4.018076144198646,\"memory\":\"byuqerpqlp\",\"ephemeralStorage\":\"cciuqgbdbutau\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } - - @Test - public void testSerialize() { - ContainerResources model = new ContainerResources().withCpu(4.018076144198646D).withMemory("byuqerpqlp"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java deleted file mode 100644 index 7f5492f8531f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java +++ /dev/null @@ -1,133 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerTests { - @Test - public void testDeserialize() { - Container model = - BinaryData - .fromString( - "{\"probes\":[{\"failureThreshold\":1847154217,\"httpGet\":{\"host\":\"dyh\",\"httpHeaders\":[],\"path\":\"kpw\",\"port\":722591670,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1405054510,\"periodSeconds\":436930302,\"successThreshold\":217402337,\"tcpSocket\":{\"host\":\"ljxywsu\",\"port\":2009471016},\"terminationGracePeriodSeconds\":6037040030407661019,\"timeoutSeconds\":371488938,\"type\":\"Readiness\"}],\"image\":\"g\",\"name\":\"gvraeaen\",\"command\":[\"zar\"],\"args\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"],\"env\":[{\"name\":\"sgplsakn\",\"value\":\"fsynljphuop\",\"secretRef\":\"dlqiyntorzih\"},{\"name\":\"osjswsr\",\"value\":\"lyzrpzbchckqqzqi\",\"secretRef\":\"iysui\"},{\"name\":\"ynkedyatrwyhqmib\",\"value\":\"hwit\",\"secretRef\":\"ypyynpcdpumnzg\"},{\"name\":\"z\",\"value\":\"abikns\",\"secretRef\":\"gj\"}],\"resources\":{\"cpu\":40.86477682375702,\"memory\":\"lwwrl\",\"ephemeralStorage\":\"m\"},\"volumeMounts\":[{\"volumeName\":\"ok\",\"mountPath\":\"llxdyhgs\"},{\"volumeName\":\"cogjltdtbn\",\"mountPath\":\"adoocrkvc\"},{\"volumeName\":\"hnvpamqgxq\",\"mountPath\":\"ezikywggxkal\"},{\"volumeName\":\"tmelw\",\"mountPath\":\"piccjzkzivgv\"}]}") - .toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } - - @Test - public void testSerialize() { - Container model = - new Container() - .withImage("g") - .withName("gvraeaen") - .withCommand(Arrays.asList("zar")) - .withArgs(Arrays.asList("q", "uijfqk", "cewiipfpub", "ibwwiftohqkv")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("sgplsakn") - .withValue("fsynljphuop") - .withSecretRef("dlqiyntorzih"), - new EnvironmentVar() - .withName("osjswsr") - .withValue("lyzrpzbchckqqzqi") - .withSecretRef("iysui"), - new EnvironmentVar() - .withName("ynkedyatrwyhqmib") - .withValue("hwit") - .withSecretRef("ypyynpcdpumnzg"), - new EnvironmentVar().withName("z").withValue("abikns").withSecretRef("gj"))) - .withResources(new ContainerResources().withCpu(40.86477682375702D).withMemory("lwwrl")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("ok").withMountPath("llxdyhgs"), - new VolumeMount().withVolumeName("cogjltdtbn").withMountPath("adoocrkvc"), - new VolumeMount().withVolumeName("hnvpamqgxq").withMountPath("ezikywggxkal"), - new VolumeMount().withVolumeName("tmelw").withMountPath("piccjzkzivgv"))) - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withFailureThreshold(1847154217) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("dyh") - .withHttpHeaders(Arrays.asList()) - .withPath("kpw") - .withPort(722591670) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1405054510) - .withPeriodSeconds(436930302) - .withSuccessThreshold(217402337) - .withTcpSocket( - new ContainerAppProbeTcpSocket().withHost("ljxywsu").withPort(2009471016)) - .withTerminationGracePeriodSeconds(6037040030407661019L) - .withTimeoutSeconds(371488938) - .withType(Type.READINESS))); - model = BinaryData.fromObject(model).toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index b40309ff25bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CookieExpirationTests { - @Test - public void testDeserialize() { - CookieExpiration model = - BinaryData - .fromString("{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"cftadeh\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } - - @Test - public void testSerialize() { - CookieExpiration model = - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("cftadeh"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java deleted file mode 100644 index 83c04a1b6871..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainConfigurationTests { - @Test - public void testDeserialize() { - CustomDomainConfiguration model = - BinaryData - .fromString( - "{\"customDomainVerificationId\":\"lbfu\",\"dnsSuffix\":\"lyjt\",\"expirationDate\":\"2021-08-04T14:40:51Z\",\"thumbprint\":\"hvfcibyfmow\",\"subjectName\":\"rkjpvdwxfzwii\"}") - .toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } - - @Test - public void testSerialize() { - CustomDomainConfiguration model = new CustomDomainConfiguration().withDnsSuffix("lyjt"); - model = BinaryData.fromObject(model).toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 7022182d6ee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainTests { - @Test - public void testDeserialize() { - CustomDomain model = - BinaryData - .fromString( - "{\"name\":\"hfxobbcswsrtj\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"lrbpbewtghfgbl\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } - - @Test - public void testSerialize() { - CustomDomain model = - new CustomDomain() - .withName("hfxobbcswsrtj") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("lrbpbewtghfgbl"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java deleted file mode 100644 index 5fc1539d6a67..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomScaleRuleTests { - @Test - public void testDeserialize() { - CustomScaleRule model = - BinaryData - .fromString( - "{\"type\":\"gsahmkycgrauw\",\"metadata\":{\"vsmzlxwab\":\"taeburuvdm\",\"efkifr\":\"q\"},\"auth\":[{\"secretRef\":\"qujmqlgkf\",\"triggerParameter\":\"ndo\"},{\"secretRef\":\"n\",\"triggerParameter\":\"jcntuj\"},{\"secretRef\":\"c\",\"triggerParameter\":\"df\"},{\"secretRef\":\"waezkojvd\",\"triggerParameter\":\"zfoqouicybxar\"}]}") - .toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - CustomScaleRule model = - new CustomScaleRule() - .withType("gsahmkycgrauw") - .withMetadata(mapOf("vsmzlxwab", "taeburuvdm", "efkifr", "q")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("qujmqlgkf").withTriggerParameter("ndo"), - new ScaleRuleAuth().withSecretRef("n").withTriggerParameter("jcntuj"), - new ScaleRuleAuth().withSecretRef("c").withTriggerParameter("df"), - new ScaleRuleAuth().withSecretRef("waezkojvd").withTriggerParameter("zfoqouicybxar"))); - model = BinaryData.fromObject(model).toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java deleted file mode 100644 index 983fad9cfb75..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java +++ /dev/null @@ -1,64 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentInnerTests { - @Test - public void testDeserialize() { - DaprComponentInner model = - BinaryData - .fromString( - "{\"properties\":{\"componentType\":\"nrojlpijnkr\",\"version\":\"rddh\",\"ignoreErrors\":false,\"initTimeout\":\"izzronasxiftozqy\",\"secrets\":[{\"name\":\"wesgogczh\",\"value\":\"nxkrlgnyhmossxkk\"}],\"secretStoreComponent\":\"h\",\"metadata\":[{\"name\":\"xjb\",\"value\":\"qxvcxgfrpdsofb\",\"secretRef\":\"rnsvbuswd\"}],\"scopes\":[\"ybycnunvj\",\"rtkfawnopq\"]},\"id\":\"kyzirtxdyux\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}") - .toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentInner model = - new DaprComponentInner() - .withComponentType("nrojlpijnkr") - .withVersion("rddh") - .withIgnoreErrors(false) - .withInitTimeout("izzronasxiftozqy") - .withSecrets(Arrays.asList(new Secret().withName("wesgogczh").withValue("nxkrlgnyhmossxkk"))) - .withSecretStoreComponent("h") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("xjb").withValue("qxvcxgfrpdsofb").withSecretRef("rnsvbuswd"))) - .withScopes(Arrays.asList("ybycnunvj", "rtkfawnopq")); - model = BinaryData.fromObject(model).toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java deleted file mode 100644 index baea4ceb25bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java +++ /dev/null @@ -1,73 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentPropertiesTests { - @Test - public void testDeserialize() { - DaprComponentProperties model = - BinaryData - .fromString( - "{\"componentType\":\"xtqmieoxor\",\"version\":\"ufhyaomtbgh\",\"ignoreErrors\":false,\"initTimeout\":\"rvk\",\"secrets\":[{\"name\":\"jzhpjbibgjmfx\",\"value\":\"vfcluyovwxnbkfe\"},{\"name\":\"xscyhwzdgirujbz\",\"value\":\"mvzzbtdcqvp\"},{\"name\":\"yujviylwdshfssn\",\"value\":\"gy\"},{\"name\":\"rymsgaojfmw\",\"value\":\"otmrfhir\"}],\"secretStoreComponent\":\"ymoxoftpipiwyczu\",\"metadata\":[{\"name\":\"pqjlihhyusps\",\"value\":\"sdvlmfwdgzxulucv\",\"secretRef\":\"mrsreuzvxurisjnh\"}],\"scopes\":[\"xifqjzgxm\",\"hu\"]}") - .toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentProperties model = - new DaprComponentProperties() - .withComponentType("xtqmieoxor") - .withVersion("ufhyaomtbgh") - .withIgnoreErrors(false) - .withInitTimeout("rvk") - .withSecrets( - Arrays - .asList( - new Secret().withName("jzhpjbibgjmfx").withValue("vfcluyovwxnbkfe"), - new Secret().withName("xscyhwzdgirujbz").withValue("mvzzbtdcqvp"), - new Secret().withName("yujviylwdshfssn").withValue("gy"), - new Secret().withName("rymsgaojfmw").withValue("otmrfhir"))) - .withSecretStoreComponent("ymoxoftpipiwyczu") - .withMetadata( - Arrays - .asList( - new DaprMetadata() - .withName("pqjlihhyusps") - .withValue("sdvlmfwdgzxulucv") - .withSecretRef("mrsreuzvxurisjnh"))) - .withScopes(Arrays.asList("xifqjzgxm", "hu")); - model = BinaryData.fromObject(model).toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java deleted file mode 100644 index 95372d8cf1fe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java +++ /dev/null @@ -1,61 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentsCollectionTests { - @Test - public void testDeserialize() { - DaprComponentsCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"txhojujb\",\"version\":\"elmcuvhixbjxyfw\",\"ignoreErrors\":true,\"initTimeout\":\"coolsttpkiwkkb\",\"secrets\":[],\"secretStoreComponent\":\"rywvtylbfpn\",\"metadata\":[],\"scopes\":[]},\"id\":\"oiwiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"componentType\":\"wct\",\"version\":\"dzjlu\",\"ignoreErrors\":false,\"initTimeout\":\"lwg\",\"secrets\":[],\"secretStoreComponent\":\"sb\",\"metadata\":[],\"scopes\":[]},\"id\":\"vtgsei\",\"name\":\"qfi\",\"type\":\"fxqknpirgneptt\"}],\"nextLink\":\"msniffc\"}") - .toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } - - @Test - public void testSerialize() { - DaprComponentsCollection model = - new DaprComponentsCollection() - .withValue( - Arrays - .asList( - new DaprComponentInner() - .withComponentType("txhojujb") - .withVersion("elmcuvhixbjxyfw") - .withIgnoreErrors(true) - .withInitTimeout("coolsttpkiwkkb") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("rywvtylbfpn") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()), - new DaprComponentInner() - .withComponentType("wct") - .withVersion("dzjlu") - .withIgnoreErrors(false) - .withInitTimeout("lwg") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("sb") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java deleted file mode 100644 index 9c6865d077de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java +++ /dev/null @@ -1,73 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"componentType\":\"ccsrmozihmipgaw\",\"version\":\"xp\",\"ignoreErrors\":true,\"initTimeout\":\"xcjxgrytfmpcy\",\"secrets\":[],\"secretStoreComponent\":\"mcayk\",\"metadata\":[],\"scopes\":[\"uztrksxwpndfcpf\"]},\"id\":\"nthjtwkjaosrxuzv\",\"name\":\"amktcqiosmgbzah\",\"type\":\"xqdlyrtltlapr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.daprComponents().list("atftgzpnpbsw", "e", Context.NONE); - - Assertions.assertEquals("ccsrmozihmipgaw", response.iterator().next().componentType()); - Assertions.assertEquals("xp", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("xcjxgrytfmpcy", response.iterator().next().initTimeout()); - Assertions.assertEquals("mcayk", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("uztrksxwpndfcpf", response.iterator().next().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java deleted file mode 100644 index c832a2f40fc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprMetadataTests { - @Test - public void testDeserialize() { - DaprMetadata model = - BinaryData - .fromString("{\"name\":\"wp\",\"value\":\"sutrgjup\",\"secretRef\":\"utpwoqhihejqgw\"}") - .toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } - - @Test - public void testSerialize() { - DaprMetadata model = new DaprMetadata().withName("wp").withValue("sutrgjup").withSecretRef("utpwoqhihejqgw"); - model = BinaryData.fromObject(model).toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index ebe4e04a66a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprSecretsCollectionInnerTests { - @Test - public void testDeserialize() { - DaprSecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"fqntcyp\",\"value\":\"jv\"},{\"name\":\"imwkslircizj\",\"value\":\"ydfce\"},{\"name\":\"vlhv\",\"value\":\"dyftumrtwna\"}]}") - .toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } - - @Test - public void testSerialize() { - DaprSecretsCollectionInner model = - new DaprSecretsCollectionInner() - .withValue( - Arrays - .asList( - new Secret().withName("fqntcyp").withValue("jv"), - new Secret().withName("imwkslircizj").withValue("ydfce"), - new Secret().withName("vlhv").withValue("dyftumrtwna"))); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 3b8027a54a9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,54 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprTests { - @Test - public void testDeserialize() { - Dapr model = - BinaryData - .fromString( - "{\"enabled\":true,\"appId\":\"prwmdyvxqt\",\"appProtocol\":\"http\",\"appPort\":357638492,\"httpReadBufferSize\":438099264,\"httpMaxRequestSize\":1692678524,\"logLevel\":\"debug\",\"enableApiLogging\":true}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } - - @Test - public void testSerialize() { - Dapr model = - new Dapr() - .withEnabled(true) - .withAppId("prwmdyvxqt") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(357638492) - .withHttpReadBufferSize(438099264) - .withHttpMaxRequestSize(1692678524) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java deleted file mode 100644 index 5df6832f9483..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DefaultAuthorizationPolicyTests { - @Test - public void testDeserialize() { - DefaultAuthorizationPolicy model = - BinaryData - .fromString( - "{\"allowedPrincipals\":{\"groups\":[\"nohjt\"],\"identities\":[\"h\",\"soifiyipjxsqw\",\"gr\"]},\"allowedApplications\":[\"norcjxvsnbyxqab\",\"mocpc\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", model.allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nohjt")) - .withIdentities(Arrays.asList("h", "soifiyipjxsqw", "gr"))) - .withAllowedApplications(Arrays.asList("norcjxvsnbyxqab", "mocpc")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", model.allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java deleted file mode 100644 index 95594f2e8c2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; -import org.junit.jupiter.api.Test; - -public final class DefaultErrorResponseErrorTests { - @Test - public void testDeserialize() { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"ofqweykhmenevfye\"}").toObject(DefaultErrorResponseError.class); - } - - @Test - public void testSerialize() { - DefaultErrorResponseError model = new DefaultErrorResponseError(); - model = BinaryData.fromObject(model).toObject(DefaultErrorResponseError.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java deleted file mode 100644 index 1ff9c37260cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - BinaryData - .fromString("{\"name\":\"egfnmntfpmvmemfn\",\"value\":\"dwvvba\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", model.value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("egfnmntfpmvmemfn").withValue("dwvvba"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java deleted file mode 100644 index 6296fe1163cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadata model = - BinaryData - .fromString( - "{\"providerName\":\"kkudzp\",\"propertyBag\":[{\"name\":\"plmag\",\"value\":\"cyohpfkyrkdbd\"},{\"name\":\"ogsjkmnwqjno\",\"value\":\"iyhddvi\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", model.propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("kkudzp") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("plmag") - .withValue("cyohpfkyrkdbd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("ogsjkmnwqjno") - .withValue("iyhddvi"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", model.propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java deleted file mode 100644 index 495097569ebc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseColumnTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseColumn model = - BinaryData - .fromString("{\"columnName\":\"orbteoy\",\"dataType\":\"hjxa\",\"columnType\":\"vjgsl\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", model.columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("orbteoy") - .withDataType("hjxa") - .withColumnType("vjgsl"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", model.columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java deleted file mode 100644 index 2b8439a752ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,59 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseObjectTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseObject model = - BinaryData - .fromString( - "{\"tableName\":\"xkcgxxlxsffgcvi\",\"columns\":[{\"columnName\":\"wlvwlyoupf\",\"dataType\":\"bkjubdyhgkfmins\",\"columnType\":\"wzf\"},{\"columnName\":\"sttktlahbqa\",\"dataType\":\"xtgzukxitmmqtgqq\",\"columnType\":\"hrnxrxc\"},{\"columnName\":\"uisavokq\",\"dataType\":\"fvazivjlfrqttba\",\"columnType\":\"katnwxyi\"},{\"columnName\":\"id\",\"dataType\":\"qfkuvscxkdmli\",\"columnType\":\"vibrxkpmloazuruo\"}],\"rows\":[]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", model.columns().get(0).columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("xkcgxxlxsffgcvi") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("wlvwlyoupf") - .withDataType("bkjubdyhgkfmins") - .withColumnType("wzf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("sttktlahbqa") - .withDataType("xtgzukxitmmqtgqq") - .withColumnType("hrnxrxc"), - new DiagnosticDataTableResponseColumn() - .withColumnName("uisavokq") - .withDataType("fvazivjlfrqttba") - .withColumnType("katnwxyi"), - new DiagnosticDataTableResponseColumn() - .withColumnName("id") - .withDataType("qfkuvscxkdmli") - .withColumnType("vibrxkpmloazuruo"))) - .withRows(Arrays.asList()); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", model.columns().get(0).columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java deleted file mode 100644 index 57e77db319d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticRenderingTests { - @Test - public void testDeserialize() { - DiagnosticRendering model = - BinaryData - .fromString( - "{\"type\":1644045294,\"title\":\"lmywwtkgkxnyed\",\"description\":\"gyvudtjuewbc\",\"isVisible\":false}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(1644045294) - .withTitle("lmywwtkgkxnyed") - .withDescription("gyvudtjuewbc") - .withIsVisible(false); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index cc714f85b1c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import org.junit.jupiter.api.Test; - -public final class DiagnosticSupportTopicTests { - @Test - public void testDeserialize() { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"wjhhgdnhxmsivf\",\"pesId\":\"iloxggdufiq\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @Test - public void testSerialize() { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index 7a2a5be7570a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsCollectionInnerTests { - @Test - public void testDeserialize() { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dataset\":[]},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}],\"nextLink\":\"k\"}") - .toObject(DiagnosticsCollectionInner.class); - } - - @Test - public void testSerialize() { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties().withDataset(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 04a2ef5693cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,73 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDataApiResponseTests { - @Test - public void testDeserialize() { - DiagnosticsDataApiResponse model = - BinaryData - .fromString( - "{\"table\":{\"tableName\":\"euzaof\",\"columns\":[{\"columnName\":\"cyyysfgdot\",\"dataType\":\"biipuip\",\"columnType\":\"qonmacj\"},{\"columnName\":\"nizshqvcim\",\"dataType\":\"vfgmblrrilby\",\"columnType\":\"xsmiccwrwfscjf\"},{\"columnName\":\"nszqujiz\",\"dataType\":\"oqytibyowbblgy\",\"columnType\":\"utp\"}],\"rows\":[]},\"renderingProperties\":{\"type\":1814921702,\"title\":\"smsks\",\"description\":\"iml\",\"isVisible\":true}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, model.renderingProperties().isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticsDataApiResponse model = - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("euzaof") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("cyyysfgdot") - .withDataType("biipuip") - .withColumnType("qonmacj"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nizshqvcim") - .withDataType("vfgmblrrilby") - .withColumnType("xsmiccwrwfscjf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nszqujiz") - .withDataType("oqytibyowbblgy") - .withColumnType("utp"))) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1814921702) - .withTitle("smsks") - .withDescription("iml") - .withIsVisible(true)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index bc2f584110f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDefinitionTests { - @Test - public void testDeserialize() { - DiagnosticsDefinition model = - BinaryData - .fromString( - "{\"id\":\"wmd\",\"name\":\"wpklvxw\",\"description\":\"gdxpg\",\"author\":\"chisze\",\"category\":\"nb\",\"supportTopicList\":[{\"id\":\"gibbdaxc\",\"pesId\":\"fozauorsuk\"},{\"id\":\"wbqpl\",\"pesId\":\"vnuuepzl\"}],\"analysisTypes\":[\"wzsoldweyuqdunv\"],\"type\":\"nrwrbiork\",\"score\":33.805977}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", model.analysisTypes().get(0)); - } - - @Test - public void testSerialize() { - DiagnosticsDefinition model = - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("wzsoldweyuqdunv")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", model.analysisTypes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java deleted file mode 100644 index f69f93b1b094..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,59 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsInnerTests { - @Test - public void testDeserialize() { - DiagnosticsInner model = - BinaryData - .fromString( - "{\"properties\":{\"metadata\":{\"id\":\"fmviklby\",\"name\":\"khbejdznxc\",\"description\":\"srhnjivo\",\"author\":\"tnovqfzgemjdftul\",\"category\":\"tduceamt\",\"supportTopicList\":[],\"analysisTypes\":[\"m\"],\"type\":\"wcw\",\"score\":57.057808},\"dataset\":[{},{},{}],\"status\":{\"message\":\"sv\",\"statusId\":750225964},\"dataProviderMetadata\":{\"providerName\":\"vk\",\"propertyBag\":[]}},\"id\":\"ql\",\"name\":\"yxgtczh\",\"type\":\"ydbsd\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } - - @Test - public void testSerialize() { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList()) - .withAnalysisTypes(Arrays.asList("m"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse())) - .withStatus(new DiagnosticsStatus().withMessage("sv").withStatusId(750225964)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("vk") - .withPropertyBag(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index ead64e3b0d1a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,115 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsPropertiesTests { - @Test - public void testDeserialize() { - DiagnosticsProperties model = - BinaryData - .fromString( - "{\"metadata\":{\"id\":\"kx\",\"name\":\"ehvbbxurip\",\"description\":\"fnhtbaxkgxyw\",\"author\":\"kpyklyhp\",\"category\":\"odpvruudlgzib\",\"supportTopicList\":[{\"id\":\"tgk\",\"pesId\":\"tvdxeclzedqb\"},{\"id\":\"hzlhplodqkdlww\",\"pesId\":\"bum\"}],\"analysisTypes\":[\"trqjfsmlmbtx\",\"w\"],\"type\":\"wsrt\",\"score\":70.81028},\"dataset\":[{\"table\":{\"tableName\":\"rhubskhud\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":328293320,\"title\":\"qfqjbvleorfm\",\"description\":\"iqtqzfavyvnq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"yeua\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":1625919856,\"title\":\"gzslesjcbhernnti\",\"description\":\"djc\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rbe\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":52673301,\"title\":\"uffkmrqemvvh\",\"description\":\"tdrjfutacoebj\",\"isVisible\":true}}],\"status\":{\"message\":\"jznmwcpmguaa\",\"statusId\":1984994243},\"dataProviderMetadata\":{\"providerName\":\"actkahzovajj\",\"propertyBag\":[{\"name\":\"xps\",\"value\":\"eekulfgslqubkwd\"},{\"name\":\"nrdsutujbazpjuoh\",\"value\":\"nyfln\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticsProperties model = - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("trqjfsmlmbtx", "w"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rhubskhud") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(328293320) - .withTitle("qfqjbvleorfm") - .withDescription("iqtqzfavyvnq") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("yeua") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1625919856) - .withTitle("gzslesjcbhernnti") - .withDescription("djc") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rbe") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(52673301) - .withTitle("uffkmrqemvvh") - .withDescription("tdrjfutacoebj") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("jznmwcpmguaa").withStatusId(1984994243)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("actkahzovajj") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("xps") - .withValue("eekulfgslqubkwd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("nrdsutujbazpjuoh") - .withValue("nyfln")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", model.dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java deleted file mode 100644 index f99b750e5ba0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsStatusTests { - @Test - public void testDeserialize() { - DiagnosticsStatus model = - BinaryData - .fromString("{\"message\":\"uwhcjyxccybv\",\"statusId\":940165825}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } - - @Test - public void testSerialize() { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("uwhcjyxccybv").withStatusId(940165825); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java deleted file mode 100644 index 20e81e02a3b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.SkuName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentSkuPropertiesTests { - @Test - public void testDeserialize() { - EnvironmentSkuProperties model = - BinaryData.fromString("{\"name\":\"Consumption\"}").toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } - - @Test - public void testSerialize() { - EnvironmentSkuProperties model = new EnvironmentSkuProperties().withName(SkuName.CONSUMPTION); - model = BinaryData.fromObject(model).toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java deleted file mode 100644 index c3a507f7eeb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java +++ /dev/null @@ -1,33 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentVarTests { - @Test - public void testDeserialize() { - EnvironmentVar model = - BinaryData - .fromString("{\"name\":\"washr\",\"value\":\"tkcnqxwb\",\"secretRef\":\"kulpiujwaasi\"}") - .toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } - - @Test - public void testSerialize() { - EnvironmentVar model = - new EnvironmentVar().withName("washr").withValue("tkcnqxwb").withSecretRef("kulpiujwaasi"); - model = BinaryData.fromObject(model).toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index e6683542350b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExtendedLocationTests { - @Test - public void testDeserialize() { - ExtendedLocation model = - BinaryData - .fromString("{\"name\":\"wrmjmwvvjektc\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @Test - public void testSerialize() { - ExtendedLocation model = - new ExtendedLocation().withName("wrmjmwvvjektc").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java deleted file mode 100644 index 42ca4bdea2c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class FacebookTests { - @Test - public void testDeserialize() { - Facebook model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"appId\":\"yulpkudjkr\",\"appSecretSettingName\":\"hbzhfepg\"},\"graphApiVersion\":\"qex\",\"login\":{\"scopes\":[\"xscpaierhhbc\"]}}") - .toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Facebook model = - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration().withAppId("yulpkudjkr").withAppSecretSettingName("hbzhfepg")) - .withGraphApiVersion("qex") - .withLogin(new LoginScopes().withScopes(Arrays.asList("xscpaierhhbc"))); - model = BinaryData.fromObject(model).toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 34afcea8f5c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ForwardProxyTests { - @Test - public void testDeserialize() { - ForwardProxy model = - BinaryData - .fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"jdyggdtji\",\"customProtoHeaderName\":\"b\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } - - @Test - public void testSerialize() { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("jdyggdtji") - .withCustomProtoHeaderName("b"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java deleted file mode 100644 index f8ffb579c3cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GitHubTests { - @Test - public void testDeserialize() { - GitHub model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"mvdjwzrlovmc\",\"clientSecretSettingName\":\"hijco\"},\"login\":{\"scopes\":[\"bzaqsqsycbkbfk\",\"ukdkexxppofmxa\",\"c\",\"jpgd\"]}}") - .toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - GitHub model = - new GitHub() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("mvdjwzrlovmc").withClientSecretSettingName("hijco")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("bzaqsqsycbkbfk", "ukdkexxppofmxa", "c", "jpgd"))); - model = BinaryData.fromObject(model).toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java deleted file mode 100644 index 10020a6f8e96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GlobalValidationTests { - @Test - public void testDeserialize() { - GlobalValidation model = - BinaryData - .fromString( - "{\"unauthenticatedClientAction\":\"AllowAnonymous\",\"redirectToProvider\":\"qnjaqwix\",\"excludedPaths\":[\"r\",\"zvcputegjvwmfda\",\"scmdvpjhulsuu\",\"mkjozkrwf\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } - - @Test - public void testSerialize() { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS) - .withRedirectToProvider("qnjaqwix") - .withExcludedPaths(Arrays.asList("r", "zvcputegjvwmfda", "scmdvpjhulsuu", "mkjozkrwf")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java deleted file mode 100644 index 179b069ab5f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java +++ /dev/null @@ -1,49 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GoogleTests { - @Test - public void testDeserialize() { - Google model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"dntwndeicbtw\",\"clientSecretSettingName\":\"zao\"},\"login\":{\"scopes\":[\"rhcffcydd\",\"lmjthjq\",\"wpyeicxmqciwqvh\",\"hix\"]},\"validation\":{\"allowedAudiences\":[\"topbobjogh\",\"e\"]}}") - .toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - Google model = - new Google() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("dntwndeicbtw").withClientSecretSettingName("zao")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("rhcffcydd", "lmjthjq", "wpyeicxmqciwqvh", "hix"))) - .withValidation( - new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("topbobjogh", "e"))); - model = BinaryData.fromObject(model).toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java deleted file mode 100644 index b7b63122ec5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java +++ /dev/null @@ -1,66 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpScaleRuleTests { - @Test - public void testDeserialize() { - HttpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"},\"auth\":[{\"secretRef\":\"guxawqaldsyuuxi\",\"triggerParameter\":\"rqf\"},{\"secretRef\":\"wyznkbyku\",\"triggerParameter\":\"pfhpagmhrskdsnfd\"},{\"secretRef\":\"oakgtdlmkkzev\",\"triggerParameter\":\"hewpusdsttwv\"},{\"secretRef\":\"vbbejdcng\",\"triggerParameter\":\"m\"}]}") - .toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - HttpScaleRule model = - new HttpScaleRule() - .withMetadata( - mapOf( - "x", - "zuf", - "khazxkhnzbonlwn", - "iqopidoamciod", - "szzcmrvexztv", - "oegokdwbwh", - "gsfraoyzkoow", - "t")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("guxawqaldsyuuxi").withTriggerParameter("rqf"), - new ScaleRuleAuth().withSecretRef("wyznkbyku").withTriggerParameter("pfhpagmhrskdsnfd"), - new ScaleRuleAuth().withSecretRef("oakgtdlmkkzev").withTriggerParameter("hewpusdsttwv"), - new ScaleRuleAuth().withSecretRef("vbbejdcng").withTriggerParameter("m"))); - model = BinaryData.fromObject(model).toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index 3c0b760a04e2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsRoutesTests { - @Test - public void testDeserialize() { - HttpSettingsRoutes model = - BinaryData.fromString("{\"apiPrefix\":\"ujjugwdkcglh\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", model.apiPrefix()); - } - - @Test - public void testSerialize() { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("ujjugwdkcglh"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", model.apiPrefix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java deleted file mode 100644 index eca2bf69f4de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,48 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsTests { - @Test - public void testDeserialize() { - HttpSettings model = - BinaryData - .fromString( - "{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"zwdejbavor\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"hctbqvudwxdn\",\"customProtoHeaderName\":\"vo\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("zwdejbavor")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("hctbqvudwxdn") - .withCustomProtoHeaderName("vo")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java deleted file mode 100644 index 13301ab6eee7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java +++ /dev/null @@ -1,103 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IngressTests { - @Test - public void testDeserialize() { - Ingress model = - BinaryData - .fromString( - "{\"fqdn\":\"rqhakauha\",\"external\":true,\"targetPort\":706986266,\"exposedPort\":949379958,\"transport\":\"http\",\"traffic\":[{\"revisionName\":\"cugicjoox\",\"weight\":554056666,\"latestRevision\":true,\"label\":\"ucww\"}],\"customDomains\":[{\"name\":\"vbvmeu\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"vyhzceuojgjrwj\"},{\"name\":\"eiotwmcdytdx\",\"bindingType\":\"Disabled\",\"certificateId\":\"xnrj\"},{\"name\":\"wgqwgxhn\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"x\"}],\"allowInsecure\":true,\"ipSecurityRestrictions\":[{\"name\":\"cg\",\"description\":\"wndnhj\",\"ipAddressRange\":\"auwhvylwzbtdhx\",\"action\":\"Allow\"}]}") - .toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } - - @Test - public void testSerialize() { - Ingress model = - new Ingress() - .withExternal(true) - .withTargetPort(706986266) - .withExposedPort(949379958) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("cugicjoox") - .withWeight(554056666) - .withLatestRevision(true) - .withLabel("ucww"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("vbvmeu") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("vyhzceuojgjrwj"), - new CustomDomain() - .withName("eiotwmcdytdx") - .withBindingType(BindingType.DISABLED) - .withCertificateId("xnrj"), - new CustomDomain() - .withName("wgqwgxhn") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("x"))) - .withAllowInsecure(true) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("cg") - .withDescription("wndnhj") - .withIpAddressRange("auwhvylwzbtdhx") - .withAction(Action.ALLOW))); - model = BinaryData.fromObject(model).toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java deleted file mode 100644 index af16468c0e50..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java +++ /dev/null @@ -1,74 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class InitContainerTests { - @Test - public void testDeserialize() { - InitContainer model = - BinaryData - .fromString( - "{\"image\":\"ogqxndlkzgxhuri\",\"name\":\"bpodxunkbebxm\",\"command\":[\"yntwlrbq\",\"koievseo\"],\"args\":[\"rlltmuwlauwzizx\"],\"env\":[{\"name\":\"cjefuzmu\",\"value\":\"bttdumorppxe\",\"secretRef\":\"nzbtbhj\"},{\"name\":\"lkfg\",\"value\":\"dneu\",\"secretRef\":\"fphsdyhtozfikdow\"},{\"name\":\"uuvxz\",\"value\":\"lvithhqzonosgg\",\"secretRef\":\"c\"}],\"resources\":{\"cpu\":61.21975235277173,\"memory\":\"jnkaljutiiswacff\",\"ephemeralStorage\":\"k\"},\"volumeMounts\":[{\"volumeName\":\"kfvhqcrailvpn\",\"mountPath\":\"fuflrwdmhdlx\"},{\"volumeName\":\"rxsagafcnihgwqa\",\"mountPath\":\"edgfbcvkcvq\"},{\"volumeName\":\"keqdcvdrhvoods\",\"mountPath\":\"bobzdopcjwvnhd\"}]}") - .toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - InitContainer model = - new InitContainer() - .withImage("ogqxndlkzgxhuri") - .withName("bpodxunkbebxm") - .withCommand(Arrays.asList("yntwlrbq", "koievseo")) - .withArgs(Arrays.asList("rlltmuwlauwzizx")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("cjefuzmu") - .withValue("bttdumorppxe") - .withSecretRef("nzbtbhj"), - new EnvironmentVar().withName("lkfg").withValue("dneu").withSecretRef("fphsdyhtozfikdow"), - new EnvironmentVar().withName("uuvxz").withValue("lvithhqzonosgg").withSecretRef("c"))) - .withResources(new ContainerResources().withCpu(61.21975235277173D).withMemory("jnkaljutiiswacff")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("kfvhqcrailvpn").withMountPath("fuflrwdmhdlx"), - new VolumeMount().withVolumeName("rxsagafcnihgwqa").withMountPath("edgfbcvkcvq"), - new VolumeMount().withVolumeName("keqdcvdrhvoods").withMountPath("bobzdopcjwvnhd"))); - model = BinaryData.fromObject(model).toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 46ffee4349ed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpSecurityRestrictionRuleTests { - @Test - public void testDeserialize() { - IpSecurityRestrictionRule model = - BinaryData - .fromString( - "{\"name\":\"gw\",\"description\":\"vlvqhjkbegi\",\"ipAddressRange\":\"t\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @Test - public void testSerialize() { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("gw") - .withDescription("vlvqhjkbegi") - .withIpAddressRange("t") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 145f7fcb84cf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class JwtClaimChecksTests { - @Test - public void testDeserialize() { - JwtClaimChecks model = - BinaryData - .fromString( - "{\"allowedGroups\":[\"qpteeh\",\"zvypyqrimzinp\"],\"allowedClientApplications\":[\"jdkirsoodqx\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } - - @Test - public void testSerialize() { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("qpteeh", "zvypyqrimzinp")) - .withAllowedClientApplications(Arrays.asList("jdkirsoodqx")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index 45f53f49ccab..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginRoutesTests { - @Test - public void testDeserialize() { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"ynpwlbj\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", model.logoutEndpoint()); - } - - @Test - public void testSerialize() { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("ynpwlbj"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", model.logoutEndpoint()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java deleted file mode 100644 index 17b344da6d8c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginScopesTests { - @Test - public void testDeserialize() { - LoginScopes model = - BinaryData - .fromString("{\"scopes\":[\"nbdxk\",\"pxokajionp\",\"mexgstxgcp\",\"dg\"]}") - .toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("nbdxk", "pxokajionp", "mexgstxgcp", "dg")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java deleted file mode 100644 index 11562c775556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java +++ /dev/null @@ -1,55 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginTests { - @Test - public void testDeserialize() { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"jumasx\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"yegu\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"xhejjzzvdud\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"fhotw\"}}") - .toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("jumasx")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("yegu")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("xhejjzzvdud")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("fhotw")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java deleted file mode 100644 index 44c4894e6653..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentOutboundSettingsTests { - @Test - public void testDeserialize() { - ManagedEnvironmentOutboundSettings model = - BinaryData - .fromString("{\"outBoundType\":\"UserDefinedRouting\",\"virtualNetworkApplianceIp\":\"l\"}") - .toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - ManagedEnvironmentOutboundSettings model = - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) - .withVirtualNetworkApplianceIp("l"); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 8cdd205d2c8c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ManagedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ob\",\"name\":\"lftidgfcwqmpim\",\"type\":\"qxzhem\"},{\"properties\":{},\"id\":\"hujswtwkozzwcul\",\"name\":\"bawpfajnjwltlwt\",\"type\":\"j\"},{\"properties\":{},\"id\":\"alhsnvkc\",\"name\":\"mxzrpoa\",\"type\":\"mlnwiaaomylweazu\"},{\"properties\":{},\"id\":\"thwwn\",\"name\":\"jhlfzswpchwahf\",\"type\":\"ousnfepgfewe\"}]}") - .toObject(ManagedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ManagedEnvironmentStoragesCollectionInner model = - new ManagedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 89cd42aeeb10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironments().delete("owa", "iynknlq", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index dc608af595c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,71 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minimumCount\":1932910769,\"maximumCount\":356571550,\"currentCount\":150383679},\"id\":\"ygjbmzyospspsh\",\"name\":\"kfkyjp\",\"type\":\"sp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.managedEnvironments().listWorkloadProfileStates("zdvpiw", "xqszdtmaajquh", Context.NONE); - - Assertions.assertEquals(1932910769, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(356571550, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(150383679, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 9a173242c218..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.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.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedServiceIdentityTests { - @Test - public void testDeserialize() { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"frzpwvlqdqgb\":{},\"lihkaetcktvfc\":{},\"snkymuctq\":{},\"bebrjcxerfuwuttt\":{}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "frzpwvlqdqgb", - new UserAssignedIdentity(), - "lihkaetcktvfc", - new UserAssignedIdentity(), - "snkymuctq", - new UserAssignedIdentity(), - "bebrjcxerfuwuttt", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 9edebf90dfe7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NonceTests { - @Test - public void testDeserialize() { - Nonce model = - BinaryData - .fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"yfsoppu\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("yfsoppu"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java deleted file mode 100644 index ee854acd908a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ClientCredentialMethod; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectClientCredential; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectClientCredentialTests { - @Test - public void testDeserialize() { - OpenIdConnectClientCredential model = - BinaryData - .fromString("{\"method\":\"ClientSecretPost\",\"clientSecretSettingName\":\"tzxdpnqbqqwx\"}") - .toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - OpenIdConnectClientCredential model = - new OpenIdConnectClientCredential() - .withMethod(ClientCredentialMethod.CLIENT_SECRET_POST) - .withClientSecretSettingName("tzxdpnqbqqwx"); - model = BinaryData.fromObject(model).toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 6afae76954b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectLoginTests { - @Test - public void testDeserialize() { - OpenIdConnectLogin model = - BinaryData - .fromString( - "{\"nameClaimType\":\"scxaq\",\"scopes\":[\"chcbonqvpkvlrxnj\",\"ase\",\"pheoflokeyy\",\"enjbdlwtgrhp\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - OpenIdConnectLogin model = - new OpenIdConnectLogin() - .withNameClaimType("scxaq") - .withScopes(Arrays.asList("chcbonqvpkvlrxnj", "ase", "pheoflokeyy", "enjbdlwtgrhp")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java deleted file mode 100644 index bb6d2928426c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.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.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDetailInnerTests { - @Test - public void testDeserialize() { - OperationDetailInner model = - BinaryData - .fromString( - "{\"name\":\"qyuvvfonkp\",\"isDataAction\":false,\"display\":{\"provider\":\"kvylauyavl\",\"resource\":\"mncsttijfybvp\",\"operation\":\"krsgsgb\",\"description\":\"uzqgnjdgkynsc\"},\"origin\":\"qhzvhxnkomt\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", model.origin()); - } - - @Test - public void testSerialize() { - OperationDetailInner model = - new OperationDetailInner() - .withName("qyuvvfonkp") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("kvylauyavl") - .withResource("mncsttijfybvp") - .withOperation("krsgsgb") - .withDescription("uzqgnjdgkynsc")) - .withOrigin("qhzvhxnkomt"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", model.origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java deleted file mode 100644 index feb8216ddb9f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"bo\",\"resource\":\"pnvdxz\",\"operation\":\"ihfrbbcevqa\",\"description\":\"ltd\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("bo") - .withResource("pnvdxz") - .withOperation("ihfrbbcevqa") - .withDescription("ltd"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", model.description()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java deleted file mode 100644 index 46c0b3a54f05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,74 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"kgozxwop\",\"isDataAction\":false,\"display\":{\"provider\":\"izqaclnapxbiyg\",\"resource\":\"gjkn\",\"operation\":\"mfcttux\",\"description\":\"yilflqoiquvrehmr\"},\"origin\":\"hvsujztc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("kgozxwop", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("izqaclnapxbiyg", response.iterator().next().display().provider()); - Assertions.assertEquals("gjkn", response.iterator().next().display().resource()); - Assertions.assertEquals("mfcttux", response.iterator().next().display().operation()); - Assertions.assertEquals("yilflqoiquvrehmr", response.iterator().next().display().description()); - Assertions.assertEquals("hvsujztc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java deleted file mode 100644 index 71b0cc930752..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QueueScaleRuleTests { - @Test - public void testDeserialize() { - QueueScaleRule model = - BinaryData - .fromString( - "{\"queueName\":\"bqwcsdbnwdcf\",\"queueLength\":1857074792,\"auth\":[{\"secretRef\":\"fuvglsbjjca\",\"triggerParameter\":\"xbvtvudu\"},{\"secretRef\":\"cormr\",\"triggerParameter\":\"qtvcofudflvkgj\"}]}") - .toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - QueueScaleRule model = - new QueueScaleRule() - .withQueueName("bqwcsdbnwdcf") - .withQueueLength(1857074792) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("fuvglsbjjca").withTriggerParameter("xbvtvudu"), - new ScaleRuleAuth().withSecretRef("cormr").withTriggerParameter("qtvcofudflvkgj"))); - model = BinaryData.fromObject(model).toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java deleted file mode 100644 index 361335f269c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryCredentialsTests { - @Test - public void testDeserialize() { - RegistryCredentials model = - BinaryData - .fromString( - "{\"server\":\"iebwwaloayqcgwrt\",\"username\":\"uzgwyzmhtx\",\"passwordSecretRef\":\"gmtsavjcbpwxqpsr\",\"identity\":\"ftguv\"}") - .toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } - - @Test - public void testSerialize() { - RegistryCredentials model = - new RegistryCredentials() - .withServer("iebwwaloayqcgwrt") - .withUsername("uzgwyzmhtx") - .withPasswordSecretRef("gmtsavjcbpwxqpsr") - .withIdentity("ftguv"); - model = BinaryData.fromObject(model).toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java deleted file mode 100644 index d17152ba628e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.RegistryInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryInfoTests { - @Test - public void testDeserialize() { - RegistryInfo model = - BinaryData - .fromString( - "{\"registryUrl\":\"fakeUrlPlaceholder\",\"registryUserName\":\"fakeNamePlaceholder\",\"registryPassword\":\"fakePasswordPlaceholder\"}") - .toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } - - @Test - public void testSerialize() { - RegistryInfo model = - new RegistryInfo() - .withRegistryUrl("fakeUrlPlaceholder") - .withRegistryUsername("fakeNamePlaceholder") - .withRegistryPassword("fakePasswordPlaceholder"); - model = BinaryData.fromObject(model).toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java deleted file mode 100644 index 5a74a66a414c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ReplicaCollectionInnerTests { - @Test - public void testDeserialize() { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-22T12:04:18Z\",\"containers\":[]},\"id\":\"fffiak\",\"name\":\"jpqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"createdTime\":\"2021-06-27T09:23:26Z\",\"containers\":[]},\"id\":\"ncyg\",\"name\":\"p\",\"type\":\"vipmdscwxqupevzh\"}]}") - .toObject(ReplicaCollectionInner.class); - } - - @Test - public void testSerialize() { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner().withContainers(Arrays.asList()), - new ReplicaInner().withContainers(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index cc77f7b8f1c7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaContainerTests { - @Test - public void testDeserialize() { - ReplicaContainer model = - BinaryData - .fromString( - "{\"name\":\"fhsxttaugz\",\"containerId\":\"faazpxdtnkdmkqjj\",\"ready\":false,\"started\":false,\"restartCount\":1886433502,\"logStreamEndpoint\":\"pyouaibrebqaays\",\"execEndpoint\":\"ixqtn\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, model.restartCount()); - } - - @Test - public void testSerialize() { - ReplicaContainer model = - new ReplicaContainer() - .withName("fhsxttaugz") - .withContainerId("faazpxdtnkdmkqjj") - .withReady(false) - .withStarted(false) - .withRestartCount(1886433502); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, model.restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java deleted file mode 100644 index 2bc20409ed83..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,55 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaInnerTests { - @Test - public void testDeserialize() { - ReplicaInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-03-31T08:41:02Z\",\"containers\":[{\"name\":\"nkhtjsyingw\",\"containerId\":\"atmtdhtmdvy\",\"ready\":true,\"started\":true,\"restartCount\":624157964,\"logStreamEndpoint\":\"ywkbirryuzhlhkjo\",\"execEndpoint\":\"vqqaatjinrvgo\"},{\"name\":\"mfiibfggj\",\"containerId\":\"olvrw\",\"ready\":false,\"started\":false,\"restartCount\":1621053169,\"logStreamEndpoint\":\"lqwjygvjayvblm\",\"execEndpoint\":\"k\"}]},\"id\":\"hbxvvyhgsopbyrqu\",\"name\":\"egxuvwzf\",\"type\":\"nhlmctlpdng\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("nkhtjsyingw") - .withContainerId("atmtdhtmdvy") - .withReady(true) - .withStarted(true) - .withRestartCount(624157964), - new ReplicaContainer() - .withName("mfiibfggj") - .withContainerId("olvrw") - .withReady(false) - .withStarted(false) - .withRestartCount(1621053169))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 93258565b3ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,67 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaPropertiesTests { - @Test - public void testDeserialize() { - ReplicaProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-01-29T19:24:27Z\",\"containers\":[{\"name\":\"hrixkwmy\",\"containerId\":\"ejvegrhbpnaixex\",\"ready\":false,\"started\":true,\"restartCount\":303838192,\"logStreamEndpoint\":\"hcexdrrvqa\",\"execEndpoint\":\"kghtpwijnh\"},{\"name\":\"svfycxzbfv\",\"containerId\":\"wvrvmtg\",\"ready\":true,\"started\":false,\"restartCount\":213302833,\"logStreamEndpoint\":\"ronzmyhgfip\",\"execEndpoint\":\"xkmcwaekrrjre\"},{\"name\":\"xt\",\"containerId\":\"umh\",\"ready\":false,\"started\":false,\"restartCount\":401545193,\"logStreamEndpoint\":\"slol\",\"execEndpoint\":\"pvuzlmv\"},{\"name\":\"lfktgplcrpwjxe\",\"containerId\":\"oi\",\"ready\":false,\"started\":true,\"restartCount\":509080980,\"logStreamEndpoint\":\"kpnb\",\"execEndpoint\":\"zejjoqk\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("hrixkwmy") - .withContainerId("ejvegrhbpnaixex") - .withReady(false) - .withStarted(true) - .withRestartCount(303838192), - new ReplicaContainer() - .withName("svfycxzbfv") - .withContainerId("wvrvmtg") - .withReady(true) - .withStarted(false) - .withRestartCount(213302833), - new ReplicaContainer() - .withName("xt") - .withContainerId("umh") - .withReady(false) - .withStarted(false) - .withRestartCount(401545193), - new ReplicaContainer() - .withName("lfktgplcrpwjxe") - .withContainerId("oi") - .withReady(false) - .withStarted(true) - .withRestartCount(509080980))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java deleted file mode 100644 index a2f4ed6ce728..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class RevisionCollectionTests { - @Test - public void testDeserialize() { - RevisionCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-15T08:47:59Z\",\"lastActiveTime\":\"2021-05-14T06:41:01Z\",\"fqdn\":\"jabibsystawf\",\"active\":true,\"replicas\":591359047,\"trafficWeight\":226758731,\"provisioningError\":\"jxbkzbzkdvn\",\"healthState\":\"Healthy\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"urgkakmokzhjjk\",\"name\":\"ffhmouwqlgzr\",\"type\":\"zeeyebi\"},{\"properties\":{\"createdTime\":\"2021-08-01T17:17:52Z\",\"lastActiveTime\":\"2021-02-02T12:35:30Z\",\"fqdn\":\"lbjbsyb\",\"active\":false,\"replicas\":146564330,\"trafficWeight\":1583288095,\"provisioningError\":\"mfpgv\",\"healthState\":\"None\",\"provisioningState\":\"Failed\"},\"id\":\"ltha\",\"name\":\"fxssm\",\"type\":\"u\"},{\"properties\":{\"createdTime\":\"2021-10-23T07:29:01Z\",\"lastActiveTime\":\"2021-01-02T11:55:22Z\",\"fqdn\":\"zpdrhneu\",\"active\":false,\"replicas\":150720980,\"trafficWeight\":2008248365,\"provisioningError\":\"i\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"gpikpzimejza\",\"name\":\"lfzxiavrmbzonoki\",\"type\":\"rjqc\"}],\"nextLink\":\"gzpfrla\"}") - .toObject(RevisionCollection.class); - } - - @Test - public void testSerialize() { - RevisionCollection model = - new RevisionCollection() - .withValue(Arrays.asList(new RevisionInner(), new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java deleted file mode 100644 index 60e7b11ae21e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import org.junit.jupiter.api.Test; - -public final class RevisionInnerTests { - @Test - public void testDeserialize() { - RevisionInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-07-24T19:53:33Z\",\"lastActiveTime\":\"2021-05-24T12:41:33Z\",\"fqdn\":\"iin\",\"template\":{\"revisionSuffix\":\"wp\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":901371312,\"trafficWeight\":1612307116,\"provisioningError\":\"szfjvfbgofelja\",\"healthState\":\"None\",\"provisioningState\":\"Provisioned\"},\"id\":\"ldvriiiojnalghfk\",\"name\":\"tvsexsowuel\",\"type\":\"qhhahhxvrhmzkwpj\"}") - .toObject(RevisionInner.class); - } - - @Test - public void testSerialize() { - RevisionInner model = new RevisionInner(); - model = BinaryData.fromObject(model).toObject(RevisionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java deleted file mode 100644 index 71cfc9d363a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionProperties; -import org.junit.jupiter.api.Test; - -public final class RevisionPropertiesTests { - @Test - public void testDeserialize() { - RevisionProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-06-22T16:52:42Z\",\"lastActiveTime\":\"2021-08-18T23:10:34Z\",\"fqdn\":\"ghftqsxhqxujxuk\",\"template\":{\"revisionSuffix\":\"digrjguufzdmsyqt\",\"initContainers\":[{\"image\":\"hbotzingamvppho\",\"name\":\"qzudphq\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"ynwcvtbv\",\"name\":\"yhmtnvyqiat\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"wzcjaesgvvsccy\",\"name\":\"g\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"zlvdnkfxusemdw\",\"name\":\"muhapfcqdpsqxqv\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"elvezrypq\",\"name\":\"feo\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":137094818,\"maxReplicas\":1870547697,\"rules\":[]},\"volumes\":[{\"name\":\"dkow\",\"storageType\":\"AzureFile\",\"storageName\":\"pc\"}]},\"active\":false,\"replicas\":2091376747,\"trafficWeight\":2104767633,\"provisioningError\":\"njv\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\"}") - .toObject(RevisionProperties.class); - } - - @Test - public void testSerialize() { - RevisionProperties model = new RevisionProperties(); - model = BinaryData.fromObject(model).toObject(RevisionProperties.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java deleted file mode 100644 index fde894377692..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleAuthTests { - @Test - public void testDeserialize() { - ScaleRuleAuth model = - BinaryData - .fromString("{\"secretRef\":\"gdknnqv\",\"triggerParameter\":\"znqntoru\"}") - .toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRuleAuth model = new ScaleRuleAuth().withSecretRef("gdknnqv").withTriggerParameter("znqntoru"); - model = BinaryData.fromObject(model).toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java deleted file mode 100644 index ab65a2ea6cc8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java +++ /dev/null @@ -1,120 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleTests { - @Test - public void testDeserialize() { - ScaleRule model = - BinaryData - .fromString( - "{\"name\":\"ubeddg\",\"azureQueue\":{\"queueName\":\"fwqmzqalkrmn\",\"queueLength\":1174672424,\"auth\":[{\"secretRef\":\"cqqudf\",\"triggerParameter\":\"yxbaaabjyvayf\"},{\"secretRef\":\"m\",\"triggerParameter\":\"rtuzqogs\"},{\"secretRef\":\"nevfdnw\",\"triggerParameter\":\"mewzsyyc\"}]},\"custom\":{\"type\":\"soibjudpfrx\",\"metadata\":{\"ytdw\":\"hzv\",\"pdtii\":\"qbrqubpaxhexiili\",\"d\":\"q\",\"fxrxxle\":\"oaxoruzfgsqu\"},\"auth\":[{\"secretRef\":\"mxjezwlw\",\"triggerParameter\":\"xuqlcvydypat\"},{\"secretRef\":\"oa\",\"triggerParameter\":\"kniod\"},{\"secretRef\":\"oebwnujhemms\",\"triggerParameter\":\"dkcrodt\"}]},\"http\":{\"metadata\":{\"fltkacjv\":\"wj\"},\"auth\":[{\"secretRef\":\"lfoakg\",\"triggerParameter\":\"fpagaowpulp\"},{\"secretRef\":\"lyls\",\"triggerParameter\":\"k\"}]},\"tcp\":{\"metadata\":{\"xsdszuempsb\":\"jervtia\",\"v\":\"kfzbeyvpnqicvi\"},\"auth\":[{\"secretRef\":\"dxrbuukzcle\",\"triggerParameter\":\"hmlwpaztzpo\"},{\"secretRef\":\"cckwyfzqwhxxbu\",\"triggerParameter\":\"a\"},{\"secretRef\":\"feqztppriol\",\"triggerParameter\":\"rjaltolmncw\"}]}}") - .toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRule model = - new ScaleRule() - .withName("ubeddg") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("fwqmzqalkrmn") - .withQueueLength(1174672424) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("cqqudf").withTriggerParameter("yxbaaabjyvayf"), - new ScaleRuleAuth().withSecretRef("m").withTriggerParameter("rtuzqogs"), - new ScaleRuleAuth().withSecretRef("nevfdnw").withTriggerParameter("mewzsyyc")))) - .withCustom( - new CustomScaleRule() - .withType("soibjudpfrx") - .withMetadata( - mapOf("ytdw", "hzv", "pdtii", "qbrqubpaxhexiili", "d", "q", "fxrxxle", "oaxoruzfgsqu")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("mxjezwlw").withTriggerParameter("xuqlcvydypat"), - new ScaleRuleAuth().withSecretRef("oa").withTriggerParameter("kniod"), - new ScaleRuleAuth().withSecretRef("oebwnujhemms").withTriggerParameter("dkcrodt")))) - .withHttp( - new HttpScaleRule() - .withMetadata(mapOf("fltkacjv", "wj")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("lfoakg").withTriggerParameter("fpagaowpulp"), - new ScaleRuleAuth().withSecretRef("lyls").withTriggerParameter("k")))) - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("xsdszuempsb", "jervtia", "v", "kfzbeyvpnqicvi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth() - .withSecretRef("dxrbuukzcle") - .withTriggerParameter("hmlwpaztzpo"), - new ScaleRuleAuth().withSecretRef("cckwyfzqwhxxbu").withTriggerParameter("a"), - new ScaleRuleAuth() - .withSecretRef("feqztppriol") - .withTriggerParameter("rjaltolmncw")))); - model = BinaryData.fromObject(model).toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java deleted file mode 100644 index 704b38964089..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java +++ /dev/null @@ -1,89 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleTests { - @Test - public void testDeserialize() { - Scale model = - BinaryData - .fromString( - "{\"minReplicas\":277220596,\"maxReplicas\":1475802306,\"rules\":[{\"name\":\"pxllrx\",\"azureQueue\":{\"queueName\":\"moadsuvarmy\",\"queueLength\":1450729079,\"auth\":[]},\"custom\":{\"type\":\"q\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}},{\"name\":\"yc\",\"azureQueue\":{\"queueName\":\"hp\",\"queueLength\":1622537719,\"auth\":[]},\"custom\":{\"type\":\"areqna\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}}]}") - .toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @Test - public void testSerialize() { - Scale model = - new Scale() - .withMinReplicas(277220596) - .withMaxReplicas(1475802306) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("pxllrx") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("moadsuvarmy") - .withQueueLength(1450729079) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule().withType("q").withMetadata(mapOf()).withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())), - new ScaleRule() - .withName("yc") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("hp") - .withQueueLength(1622537719) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule() - .withType("areqna") - .withMetadata(mapOf()) - .withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java deleted file mode 100644 index f50d916afccb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Secret; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SecretTests { - @Test - public void testDeserialize() { - Secret model = BinaryData.fromString("{\"name\":\"k\",\"value\":\"ali\"}").toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } - - @Test - public void testSerialize() { - Secret model = new Secret().withName("k").withValue("ali"); - model = BinaryData.fromObject(model).toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java deleted file mode 100644 index 728c1021123f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class SecretsCollectionInnerTests { - @Test - public void testDeserialize() { - SecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"racstwity\",\"value\":\"evxccedcp\"},{\"name\":\"dyodnwzxltj\",\"value\":\"nhltiugcxn\"},{\"name\":\"vwxqibyqunyo\",\"value\":\"wlmdjrkv\"},{\"name\":\"bvfvpdbod\",\"value\":\"izsjqlhkrr\"}]}") - .toObject(SecretsCollectionInner.class); - } - - @Test - public void testSerialize() { - SecretsCollectionInner model = - new SecretsCollectionInner() - .withValue( - Arrays - .asList( - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret())); - model = BinaryData.fromObject(model).toObject(SecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java deleted file mode 100644 index ca43891e15c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlCollectionTests { - @Test - public void testDeserialize() { - SourceControlCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"mtggu\",\"branch\":\"ijr\"},\"id\":\"ivmmghfcfiwrxgk\",\"name\":\"euvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"q\",\"branch\":\"aqvlgafcqusr\"},\"id\":\"t\",\"name\":\"wsdtutnwl\",\"type\":\"uycvuzhyrmewip\"},{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"xukuqgsj\",\"branch\":\"undxgketw\"},\"id\":\"zjhfjmhvv\",\"name\":\"uvgp\",\"type\":\"uneqsxvmhf\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"ihsasb\",\"branch\":\"dyp\"},\"id\":\"uemsly\",\"name\":\"sqy\",\"type\":\"pfoobr\"}],\"nextLink\":\"tyms\"}") - .toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } - - @Test - public void testSerialize() { - SourceControlCollection model = - new SourceControlCollection() - .withValue( - Arrays - .asList( - new SourceControlInner().withRepoUrl("mtggu").withBranch("ijr"), - new SourceControlInner().withRepoUrl("q").withBranch("aqvlgafcqusr"), - new SourceControlInner().withRepoUrl("xukuqgsj").withBranch("undxgketw"), - new SourceControlInner().withRepoUrl("ihsasb").withBranch("dyp"))); - model = BinaryData.fromObject(model).toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java deleted file mode 100644 index dfd718e91ff0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java +++ /dev/null @@ -1,55 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlInnerTests { - @Test - public void testDeserialize() { - SourceControlInner model = - BinaryData - .fromString( - "{\"properties\":{\"operationState\":\"Failed\",\"repoUrl\":\"dnfwqzdzg\",\"branch\":\"la\",\"githubActionConfiguration\":{\"contextPath\":\"qlyvijo\",\"image\":\"iv\",\"publishType\":\"oyzunbixxr\",\"os\":\"kvcpwpgclr\",\"runtimeStack\":\"vtsoxf\",\"runtimeVersion\":\"enxpmyyefr\"}},\"id\":\"pdnqqskawaoqvmmb\",\"name\":\"pqfrtqlkz\",\"type\":\"egnitg\"}") - .toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } - - @Test - public void testSerialize() { - SourceControlInner model = - new SourceControlInner() - .withRepoUrl("dnfwqzdzg") - .withBranch("la") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("qlyvijo") - .withImage("iv") - .withPublishType("oyzunbixxr") - .withOs("kvcpwpgclr") - .withRuntimeStack("vtsoxf") - .withRuntimeVersion("enxpmyyefr")); - model = BinaryData.fromObject(model).toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java deleted file mode 100644 index d62489c363d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java +++ /dev/null @@ -1,57 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TcpScaleRuleTests { - @Test - public void testDeserialize() { - TcpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"auth\":[{\"secretRef\":\"oftrmaequia\",\"triggerParameter\":\"icslfaoq\"},{\"secretRef\":\"iyylhalnswhccsp\",\"triggerParameter\":\"aivwitqscywu\"},{\"secretRef\":\"woluhczbwemhair\",\"triggerParameter\":\"rgzdwmsweyp\"},{\"secretRef\":\"dxggicccnxqhuexm\",\"triggerParameter\":\"tlstvlzywem\"}]}") - .toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - TcpScaleRule model = - new TcpScaleRule() - .withMetadata(mapOf("twaenuuzko", "ufgmjzrwrdg", "iefozbhdmsml", "bminrfdwoyuhhzi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("oftrmaequia").withTriggerParameter("icslfaoq"), - new ScaleRuleAuth().withSecretRef("iyylhalnswhccsp").withTriggerParameter("aivwitqscywu"), - new ScaleRuleAuth().withSecretRef("woluhczbwemhair").withTriggerParameter("rgzdwmsweyp"), - new ScaleRuleAuth().withSecretRef("dxggicccnxqhuexm").withTriggerParameter("tlstvlzywem"))); - model = BinaryData.fromObject(model).toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java deleted file mode 100644 index 4343123445bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java +++ /dev/null @@ -1,158 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TemplateTests { - @Test - public void testDeserialize() { - Template model = - BinaryData - .fromString( - "{\"revisionSuffix\":\"mcqibycnojv\",\"initContainers\":[{\"image\":\"fqsgzvahapjy\",\"name\":\"pvgqzcjrvxdjzlm\",\"command\":[\"kvugfhzovawjvzun\",\"uthnnprnxipeilpj\",\"uaejxdultsk\"],\"args\":[\"tdzumveekgpw\",\"zuhkfpbsjyof\",\"xl\"],\"env\":[],\"resources\":{\"cpu\":63.45978205100479,\"memory\":\"waboe\",\"ephemeralStorage\":\"v\"},\"volumeMounts\":[]},{\"image\":\"smv\",\"name\":\"wyjsflhhcaalnjix\",\"command\":[\"yaw\",\"oyaqcslyjpkiid\"],\"args\":[\"xznelixhnrztf\",\"lhbnxkna\",\"aulppggd\"],\"env\":[],\"resources\":{\"cpu\":62.44640700433306,\"memory\":\"ropuhpigv\",\"ephemeralStorage\":\"ylgqgitxmedjvcsl\"},\"volumeMounts\":[]},{\"image\":\"wncwzzhxgktrmg\",\"name\":\"napkteoellw\",\"command\":[\"d\",\"gpfqbuace\",\"pzfqrhhuaoppp\",\"qeqxo\"],\"args\":[\"ahzxctobgbk\",\"moizpos\",\"mgrcfbu\"],\"env\":[],\"resources\":{\"cpu\":39.820918987867984,\"memory\":\"kxbpvj\",\"ephemeralStorage\":\"jhxxjyn\"},\"volumeMounts\":[]},{\"image\":\"vkr\",\"name\":\"wbxqzvszjfau\",\"command\":[\"dxxiv\",\"tvtc\",\"aqtdoqmcbx\",\"wvxysl\"],\"args\":[\"sfxobl\",\"tkblmpewww\",\"bkrvrnsvshqj\"],\"env\":[],\"resources\":{\"cpu\":26.217415829732616,\"memory\":\"ovasrruvwbhsqfsu\",\"ephemeralStorage\":\"gjb\"},\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"rfbjf\",\"name\":\"w\",\"command\":[\"t\",\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"args\":[\"ytjrybnwjewgdr\",\"ervnaenqpehi\",\"doy\",\"mifthnzdnd\"],\"env\":[],\"resources\":{\"cpu\":9.874823960807245,\"memory\":\"gynduha\",\"ephemeralStorage\":\"qlkth\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"bgycduiertgccym\",\"name\":\"olpsslqlf\",\"command\":[\"n\",\"bglzpswi\",\"d\"],\"args\":[\"yhz\",\"xssadbzmnvdf\"],\"env\":[],\"resources\":{\"cpu\":6.678154863771269,\"memory\":\"xzb\",\"ephemeralStorage\":\"blylpstdbh\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"zucerscdntnev\",\"name\":\"wjmy\",\"command\":[\"sslswtmweriof\",\"pyqs\"],\"args\":[\"abnetshh\"],\"env\":[],\"resources\":{\"cpu\":83.1289050402311,\"memory\":\"wiwubm\",\"ephemeralStorage\":\"besldnkwwtppjflc\"},\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":97204853,\"maxReplicas\":244687825,\"rules\":[{\"name\":\"sikvmkqzeqqkdlt\"}]},\"volumes\":[{\"name\":\"gureodkwobdag\",\"storageType\":\"EmptyDir\",\"storageName\":\"qdxbxwa\"}]}") - .toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - Template model = - new Template() - .withRevisionSuffix("mcqibycnojv") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("fqsgzvahapjy") - .withName("pvgqzcjrvxdjzlm") - .withCommand(Arrays.asList("kvugfhzovawjvzun", "uthnnprnxipeilpj", "uaejxdultsk")) - .withArgs(Arrays.asList("tdzumveekgpw", "zuhkfpbsjyof", "xl")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(63.45978205100479D).withMemory("waboe")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("smv") - .withName("wyjsflhhcaalnjix") - .withCommand(Arrays.asList("yaw", "oyaqcslyjpkiid")) - .withArgs(Arrays.asList("xznelixhnrztf", "lhbnxkna", "aulppggd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(62.44640700433306D).withMemory("ropuhpigv")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("wncwzzhxgktrmg") - .withName("napkteoellw") - .withCommand(Arrays.asList("d", "gpfqbuace", "pzfqrhhuaoppp", "qeqxo")) - .withArgs(Arrays.asList("ahzxctobgbk", "moizpos", "mgrcfbu")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(39.820918987867984D).withMemory("kxbpvj")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("vkr") - .withName("wbxqzvszjfau") - .withCommand(Arrays.asList("dxxiv", "tvtc", "aqtdoqmcbx", "wvxysl")) - .withArgs(Arrays.asList("sfxobl", "tkblmpewww", "bkrvrnsvshqj")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources() - .withCpu(26.217415829732616D) - .withMemory("ovasrruvwbhsqfsu")) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("rfbjf") - .withName("w") - .withCommand(Arrays.asList("t", "tpvjzbexilzznfqq", "vwpm", "taruoujmkcj")) - .withArgs(Arrays.asList("ytjrybnwjewgdr", "ervnaenqpehi", "doy", "mifthnzdnd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(9.874823960807245D).withMemory("gynduha")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("bgycduiertgccym") - .withName("olpsslqlf") - .withCommand(Arrays.asList("n", "bglzpswi", "d")) - .withArgs(Arrays.asList("yhz", "xssadbzmnvdf")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(6.678154863771269D).withMemory("xzb")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("zucerscdntnev") - .withName("wjmy") - .withCommand(Arrays.asList("sslswtmweriof", "pyqs")) - .withArgs(Arrays.asList("abnetshh")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(83.1289050402311D).withMemory("wiwubm")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(97204853) - .withMaxReplicas(244687825) - .withRules(Arrays.asList(new ScaleRule().withName("sikvmkqzeqqkdlt")))) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("gureodkwobdag") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("qdxbxwa"))); - model = BinaryData.fromObject(model).toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index 49d809a3ba2f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TrafficWeightTests { - @Test - public void testDeserialize() { - TrafficWeight model = - BinaryData - .fromString( - "{\"revisionName\":\"nbmpowuwprzq\",\"weight\":706936275,\"latestRevision\":false,\"label\":\"upjm\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } - - @Test - public void testSerialize() { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("nbmpowuwprzq") - .withWeight(706936275) - .withLatestRevision(false) - .withLabel("upjm"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 1633158b2f51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityTests { - @Test - public void testDeserialize() { - UserAssignedIdentity model = BinaryData.fromString("{}").toObject(UserAssignedIdentity.class); - } - - @Test - public void testSerialize() { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index 7da57ae8a6d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.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.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VnetConfigurationTests { - @Test - public void testDeserialize() { - VnetConfiguration model = - BinaryData - .fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"er\",\"runtimeSubnetId\":\"pqbmfpjbab\",\"dockerBridgeCidr\":\"dfc\",\"platformReservedCidr\":\"spuunnoxyhkxgq\",\"platformReservedDnsIP\":\"rihpfhoq\",\"outboundSettings\":{\"outBoundType\":\"LoadBalancer\",\"virtualNetworkApplianceIp\":\"dao\"}}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("er") - .withRuntimeSubnetId("pqbmfpjbab") - .withDockerBridgeCidr("dfc") - .withPlatformReservedCidr("spuunnoxyhkxgq") - .withPlatformReservedDnsIp("rihpfhoq") - .withOutboundSettings( - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.LOAD_BALANCER) - .withVirtualNetworkApplianceIp("dao")); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index eb336740d619..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeMountTests { - @Test - public void testDeserialize() { - VolumeMount model = - BinaryData - .fromString("{\"volumeName\":\"btkuwhh\",\"mountPath\":\"ykojoxafnndlpic\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } - - @Test - public void testSerialize() { - VolumeMount model = new VolumeMount().withVolumeName("btkuwhh").withMountPath("ykojoxafnndlpic"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java deleted file mode 100644 index c384f073f8b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Volume; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeTests { - @Test - public void testDeserialize() { - Volume model = - BinaryData - .fromString("{\"name\":\"rncsdtclu\",\"storageType\":\"EmptyDir\",\"storageName\":\"bsfgytguslfea\"}") - .toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } - - @Test - public void testSerialize() { - Volume model = - new Volume().withName("rncsdtclu").withStorageType(StorageType.EMPTY_DIR).withStorageName("bsfgytguslfea"); - model = BinaryData.fromObject(model).toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java deleted file mode 100644 index dd61687caefa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesCollectionTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":1215063805,\"maximumCount\":1612515115,\"currentCount\":75239046},\"id\":\"metttwgd\",\"name\":\"lqxihhrmooiz\",\"type\":\"seypxiutcxapz\"}],\"nextLink\":\"rpetogebjoxsl\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, model.value().get(0).properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesCollection model = - new WorkloadProfileStatesCollection() - .withValue( - Arrays - .asList( - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1215063805) - .withMaximumCount(1612515115) - .withCurrentCount(75239046)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, model.value().get(0).properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java deleted file mode 100644 index 6ae23c1eb328..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesInnerTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesInner model = - BinaryData - .fromString( - "{\"properties\":{\"minimumCount\":1522179907,\"maximumCount\":255034362,\"currentCount\":1064191938},\"id\":\"nk\",\"name\":\"zjcjbtr\",\"type\":\"aehvvibrxjjstoq\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, model.properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1522179907) - .withMaximumCount(255034362) - .withCurrentCount(1064191938)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, model.properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java deleted file mode 100644 index 7fe7ba5a869b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesPropertiesTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesProperties model = - BinaryData - .fromString("{\"minimumCount\":449265761,\"maximumCount\":774286462,\"currentCount\":1086468364}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, model.currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(449265761) - .withMaximumCount(774286462) - .withCurrentCount(1086468364); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, model.currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java deleted file mode 100644 index 83588dd997c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileTests { - @Test - public void testDeserialize() { - WorkloadProfile model = - BinaryData - .fromString( - "{\"workloadProfileType\":\"wzjbh\",\"minimumCount\":1608749608,\"maximumCount\":1253939074}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } - - @Test - public void testSerialize() { - WorkloadProfile model = - new WorkloadProfile() - .withWorkloadProfileType("wzjbh") - .withMinimumCount(1608749608) - .withMaximumCount(1253939074); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } -}